blob: 2f9dfc762b84fc39e01c5c019356a68f3e600eb8 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// thing/commands.h -- command handling header
4//
5// $Id: commands.h 8707 2014-02-23 22:38:34Z Zesstra $
6
7#ifndef __THING_COMMANDS_H__
8#define __THING_COMMANDS_H__
9
10// properties
11
12#define P_COMMANDS "commands"
Zesstrabab5a9d2016-07-30 12:53:35 +020013#define P_SYNTAX_HELP "lib_p_syntaxhelp"
MG Mud User88f12472016-06-24 23:31:02 +020014
15#endif // __THING_COMMANDS_H__
16
17#ifdef NEED_PROTOTYPES
18
19#ifndef __THING_COMMANDS_H_PROTO__
20#define __THING_COMMANDS_H_PROTO__
21
22// prototypes
23
24// add commands to the command list of the object
25varargs void AddCmd(mixed cmd, mixed func, mixed flag, mixed cmdid);
26
27// remove a command
28varargs int RemoveCmd(mixed cmd, int del_norule, mixed onlyid);
29// Set- und Query-Methoden
30static mapping _set_commands(mapping commands);
31static mapping _query_commands();
32
33
34// internal
35static int _execute(mixed fun, string str, mixed *parsed);
36static int _process_command(string str, string *noparsestr,mixed fun, mixed flag, mixed rule);
37
38public int _cl(string str);
39
40#endif // __THING_COMMANDS_H_PROTO__
41
42#endif // NEED_PROTOYPES