]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_modules.cpp
Skip certificate generation if we're running non-interactive
[user/henk/code/inspircd.git] / src / cmd_modules.cpp
index af8c3e9abdd5b0a6d9c138c1ce2dde34dec166f5..22e3a32bb11563818088a06d3859ac932e8ab5c2 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <time.h>
-#include <string>
-#include <map>
-#include <sstream>
-#include <vector>
-#include <deque>
-#include "inspircd_config.h"
 #include "inspircd.h"
 #include "configreader.h"
-#include "hash_map.h"
 #include "users.h"
 #include "modules.h"
-#include "commands.h"
-
 #include "wildcard.h"
 #include "commands/cmd_modules.h"
 
-
-
 char* itab[] = {
        "OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw",
        "OnExtendedMode", "OnUserPreJoin", "OnUserPreKick", "OnUserKick", "OnOper", "OnInfo", "OnWhois", "OnUserPreInvite",
@@ -43,12 +31,20 @@ char* itab[] = {
        "OnCleanup", "OnUserPostNick", "OnAccessCheck", "On005Numeric", "OnKill", "OnRemoteKill", "OnLoadModule", "OnUnloadModule",
        "OnBackgroundTimer", "OnSendList", "OnPreCommand", "OnCheckReady", "OnUserRrgister", "OnRawMode", "OnCheckInvite",
        "OnCheckKey", "OnCheckLimit", "OnCheckBan", "OnStats", "OnChangeLocalUserHost", "OnChangeLocalUserGecos", "OnLocalTopicChange",
-       "OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnGlobalConnect", "OnAddBan", "OnDelBan",
+       "OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnPostConnect", "OnAddBan", "OnDelBan",
        "OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister",
-       "OnOperCompare", "OnChannelDelete", "OnPostOper", "OnSyncOtherMetaData", "OnSetAway", "OnCancelAway", NULL
+       "OnOperCompare", "OnChannelDelete", "OnPostOper", "OnSyncOtherMetaData", "OnSetAway", "OnCancelAway", "OnNamesList",
+       "OnPostCommand", NULL
 };
 
-void cmd_modules::Handle (const char** parameters, int pcnt, userrec *user)
+extern "C" command_t* init_command(InspIRCd* Instance)
+{
+       return new cmd_modules(Instance);
+}
+
+/** Handle /MODULES
+ */
+CmdResult cmd_modules::Handle (const char** parameters, int pcnt, userrec *user)
 {
        for (unsigned int i = 0; i < ServerInstance->Config->module_names.size(); i++)
        {
@@ -113,4 +109,6 @@ void cmd_modules::Handle (const char** parameters, int pcnt, userrec *user)
                }
        }
        user->WriteServ("901 %s :End of MODULES list",user->nick);
+
+       return CMD_SUCCESS;
 }