]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_modules.cpp
Fix total mess of makefile dependency macros (all depending on stuff they dont NEED...
[user/henk/code/inspircd.git] / src / commands / cmd_modules.cpp
index 434bd9569c1bd2e865d63c0544cb674a54d1d576..9474dece45bcfed53ff1dfa0accbf73b676f1d52 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -15,7 +15,7 @@
 #include "wildcard.h"
 #include "commands/cmd_modules.h"
 
-char* itab[] = {
+const char* itab[] = {
        "OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw",
        "OnUserPreJoin", "OnUserPreKick", "OnUserKick", "OnOper", "OnInfo", "OnWhois", "OnUserPreInvite",
        "OnUserInvite", "OnUserPreMessage", "OnUserPreNotice", "OnUserPreNick", "OnUserMessage", "OnUserNotice", "OnMode",
@@ -38,7 +38,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 
 /** Handle /MODULES
  */
-CmdResult CommandModules::Handle (const char**, int, User *user)
+CmdResult CommandModules::Handle (const std::vector<std::string>&, User *user)
 {
        std::vector<std::string> module_names = ServerInstance->Modules->GetAllModuleNames(0);
 
@@ -62,14 +62,14 @@ CmdResult CommandModules::Handle (const char**, int, User *user)
                strlcpy(modulename,module_names[i].c_str(),256);
                if (IS_OPER(user))
                {
-                       user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,m,V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
+                       user->WriteNumeric(702, "%s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick.c_str(),(unsigned long)m,V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
                }
                else
                {
-                       user->WriteServ("900 %s :%s",user->nick,ServerConfig::CleanFilename(modulename));
+                       user->WriteNumeric(702, "%s :%s",user->nick.c_str(),ServerConfig::CleanFilename(modulename));
                }
        }
-       user->WriteServ("901 %s :End of MODULES list",user->nick);
+       user->WriteNumeric(703, "%s :End of MODULES list",user->nick.c_str());
 
        return CMD_SUCCESS;
 }