added cmd_netinfo
[NeonServV5.git] / modcmd.h
index 5c76a6ad5e94b31fd8cb62ecf90cabe88918f788..2afdfe43f20d3f26f33fb6f906a733e7a80d7186 100644 (file)
--- a/modcmd.h
+++ b/modcmd.h
@@ -6,7 +6,9 @@
 #define CMDFLAG_REQUIRE_AUTH 0x02
 #define CMDFLAG_REQUIRE_GOD  0x04
 #define CMDFLAG_CHECK_AUTH   0x08
-#define CMDFLAG_OVERRIDE_ACCESS 0x10
+#define CMDFLAG_REGISTERED_CHAN 0x10
+#define CMDFLAG_OVERRIDE_GLOBAL_ACCESS 0x20
+#define CMDFLAG_OVERRIDE_CHANNEL_ACCESS 0x40
 
 struct ClientSocket;
 struct UserNode;
@@ -22,6 +24,8 @@ struct cmd_function {
     cmd_bind_t *func;
     unsigned int flags;
     int paramcount;
+    int global_access;
+    char *channel_access;
     
     struct cmd_function *next;
 };
@@ -32,6 +36,8 @@ struct cmd_binding {
     struct cmd_function *func;
     unsigned int flags;
     char *parameters;
+    int global_access;
+    char *channel_access;
     
     struct cmd_binding *next;
 };
@@ -46,11 +52,15 @@ struct trigger_cache {
 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 bind_cmd_to_command(int botid, char *cmd, char *func);
 int unbind_cmd(int botid, char *cmd);
+struct ClientSocket *getTextBot();
+void bind_set_parameters(int botid, char *cmd, char *parameters);
+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