added get_userauth to WHOHandler.c and continues modcmd
[NeonServV5.git] / modcmd.h
index 6f9ff85d383c826d2afc9db6e77ee316a5d57f27..5c76a6ad5e94b31fd8cb62ecf90cabe88918f788 100644 (file)
--- a/modcmd.h
+++ b/modcmd.h
@@ -2,6 +2,12 @@
 #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;
@@ -14,6 +20,8 @@ struct cmd_function {
     char *name;
     int botid;
     cmd_bind_t *func;
+    unsigned int flags;
+    int paramcount;
     
     struct cmd_function *next;
 };
@@ -22,6 +30,8 @@ struct cmd_binding {
     char *cmd;
     int botid;
     struct cmd_function *func;
+    unsigned int flags;
+    char *parameters;
     
     struct cmd_binding *next;
 };
@@ -36,7 +46,7 @@ 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 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);