#define CMDFLAG_REQUIRE_AUTH 0x02
#define CMDFLAG_REQUIRE_GOD 0x04
#define CMDFLAG_CHECK_AUTH 0x08
-#define CMDFLAG_OVERRIDE_ACCESS 0x10
-#define CMDFLAG_REGISTERED_CHAN 0x20
+#define CMDFLAG_REGISTERED_CHAN 0x10
+#define CMDFLAG_OVERRIDE_GLOBAL_ACCESS 0x20
+#define CMDFLAG_OVERRIDE_CHANNEL_ACCESS 0x40
struct ClientSocket;
struct UserNode;
cmd_bind_t *func;
unsigned int flags;
int paramcount;
+ int global_access;
+ char *channel_access;
struct cmd_function *next;
};
struct cmd_function *func;
unsigned int flags;
char *parameters;
- int gaccess;
+ int global_access;
+ char *channel_access;
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 paramcount, unsigned int flags);
+int register_command(int botid, char *name, cmd_bind_t *func, int paramcount, unsigned int flags, char *channel_access, int global_access);
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);
int unbind_cmd(int botid, char *cmd);
struct ClientSocket *getTextBot();
void bind_set_parameters(int botid, char *cmd, char *parameters);
-void bind_set_gaccess(int botid, char *cmd, int gaccess);
+void bind_set_global_access(int botid, char *cmd, int gaccess);
+void bind_set_channel_access(int botid, char *cmd, char *chanaccess);
#endif
\ No newline at end of file