]> jfr.im git - irc/quakenet/newserv.git/blobdiff - helpmod2/hcommands.c
Remove valgrind suppressions file
[irc/quakenet/newserv.git] / helpmod2 / hcommands.c
index 56b2574b3667357719ca26a52670f06971ccba28..39f63041710bb54917abecc072549dc565b23833 100644 (file)
@@ -5,6 +5,8 @@
 #include <sys/types.h>
 #include <dirent.h>
 
+#include "../lib/strlfunc.h"
+
 #include "hcommands.h"
 #include "hcommand.h"
 
@@ -766,7 +768,7 @@ static void helpmod_cmd_welcome (huser *sender, channel* returntype, char* ostr,
     }
     else
     {
-        strcpy(hchan->welcome, ostr);
+        strlcpy(hchan->welcome, ostr, HCHANNEL_WELCOME_LEN);
         helpmod_reply(sender, returntype, "Welcome message for channel %s (%s) is now: %s", hchan->real_channel->index->name->content, hchannel_get_state(hchan, H_WELCOME), hchan->welcome);
     }
 }
@@ -2155,7 +2157,7 @@ static void helpmod_cmd_mode(huser *sender, channel* returntype, int change, cha
         husr = huser_get(getnickbynick(argv[i]));
         if (husr == NULL)
         {
-            helpmod_reply(sender, returntype, "Cannot change mode: User %s not found", argv[i], hchannel_get_name(hchan));
+            helpmod_reply(sender, returntype, "Cannot change mode: User %s not found", argv[i]);
             continue;
         }
         huserchan = huser_on_channel(husr, hchan);
@@ -3553,9 +3555,9 @@ void helpmod_cmd_status (huser *sender, channel* returntype, char* ostr, int arg
     helpmod_reply(sender, returntype, "Channels          %d", hchannel_count());
     helpmod_reply(sender, returntype, "Accounts          %d", haccount_count(H_ANY));
     helpmod_reply(sender, returntype, "Users             %d", huser_count());
-    helpmod_reply(sender, returntype, "Help entries      %d", helpmod_entry_count(helpmod_base));
+    helpmod_reply(sender, returntype, "Help entries      %ld", helpmod_entry_count(helpmod_base));
     helpmod_reply(sender, returntype, "Bans              %d", hban_count());
-    helpmod_reply(sender, returntype, "Help provided     %d", helpmod_usage);
+    helpmod_reply(sender, returntype, "Help provided     %ld", helpmod_usage);
     helpmod_reply(sender, returntype, "Tickets           %d", hticket_count());
 }
 
@@ -3846,6 +3848,10 @@ void helpmod_command(huser *sender, channel* returntype, char *args)
 
        if (hcom == NULL)
        {
+            controlwall(NO_DEVELOPER, NL_ALL_COMMANDS, "(G) From: %s!%s@%s%s%s: %s",
+                        sender->real_user->nick, sender->real_user->ident,
+                        sender->real_user->host->name->content, IsAccount(sender->real_user)?"/":"",
+                        IsAccount(sender->real_user)?sender->real_user->authname:"", args);            
            if ((returntype == NULL) ||
                (sender->account != NULL && !(sender->account->flags & H_NO_CMD_ERROR)))
                helpmod_reply(sender, returntype, "Unknown command '%s', please see showcommands for a list of all commands available to you", parsed_args[0]);