*** VERSION 5.4.0 ***
[NeonServV5.git] / src / modcmd.c
index 7ba0b939d6cae97eba0645fade114475474accfd..764ccedab1c7807c4e854a879c73157ca9434cc9 100644 (file)
@@ -1,4 +1,4 @@
-/* modcmd.c - NeonServ v5.3
+/* modcmd.c - NeonServ v5.4
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -369,7 +369,7 @@ static void handle_command(struct ClientSocket *client, struct UserNode *user, s
                 data->args_buffer = args_buffer;
                 data->cbind = cbind;
                 data->textclient = tmp_text_client;
-                get_userauth(user, command_checked_auth, data);
+                get_userauth(user, 0, command_checked_auth, data);
                 return;
             } else
                 handle_command_async(client, user, chan, sent_chan, cbind, argv, argc);
@@ -827,10 +827,10 @@ struct ClientSocket *getTextBot() {
 
 void init_modcmd() {
     cmd_binds = calloc(27, sizeof(*cmd_binds));
-    bind_chanmsg(got_chanmsg);
-    bind_privmsg(got_privmsg);
+    bind_chanmsg(got_chanmsg, 0);
+    bind_privmsg(got_privmsg, 0);
     register_default_language_table(msgtab);
-    register_command(0, "linker", modcmd_linker, 0, 0, 0, 0); //fake command for subcommands
+    register_command(0, "linker", 0, modcmd_linker, 0, 0, 0, 0); //fake command for subcommands
 }
 
 void free_modcmd() {
@@ -1052,7 +1052,7 @@ void unregister_module_commands(int module_id) {
         } else
             prevfunct = cmdfunct;
     }
-    static struct trigger_callback *cb, *prevcb = NULL, *nextcb;
+    struct trigger_callback *cb, *prevcb = NULL, *nextcb;
     for(cb = trigger_callbacks; cb; cb = nextcb) {
         nextcb = cb->next;
         if(cb->module_id == module_id) {