#define _modcmd_h
#include "main.h"
+#define CMDFLAG_REQUIRE_CHAN 0x01
+#define CMDFLAG_REQUIRE_AUTH 0x02
+#define CMDFLAG_REQUIRE_GOD 0x04
+#define CMDFLAG_CHECK_AUTH 0x08
+#define CMDFLAG_OVERRIDE_ACCESS 0x10
+
struct ClientSocket;
struct UserNode;
struct ChanNode;
char *name;
int botid;
cmd_bind_t *func;
+ unsigned int flags;
+ int paramcount;
struct cmd_function *next;
};
char *cmd;
int botid;
struct cmd_function *func;
+ unsigned int flags;
+ char *parameters;
struct cmd_binding *next;
};
void init_modcmd();
void free_modcmd();
struct ClientSocket* get_prefered_bot(int botid);
-int register_command(int botid, char *name, cmd_bind_t *func);
+int register_command(int botid, char *name, cmd_bind_t *func, int paramcount, unsigned int flags);
int set_trigger_callback(int botid, trigger_callback_t *func);
int changeChannelTrigger(int botid, struct ChanNode *chan, char *new_trigger);
int bind_cmd_to_function(int botid, char *cmd, struct cmd_function *func);