1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
16 #include "commands/cmd_modules.h"
19 "OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw",
20 "OnUserPreJoin", "OnUserPreKick", "OnUserKick", "OnOper", "OnInfo", "OnWhois", "OnUserPreInvite",
21 "OnUserInvite", "OnUserPreMessage", "OnUserPreNotice", "OnUserPreNick", "OnUserMessage", "OnUserNotice", "OnMode",
22 "OnGetServerDescription", "OnSyncUser", "OnSyncChannel", "OnSyncChannelMetaData", "OnSyncUserMetaData",
23 "OnDecodeMetaData", "ProtoSendMode", "ProtoSendMetaData", "OnWallops", "OnChangeHost", "OnChangeName", "OnAddGLine",
24 "OnAddZLine", "OnAddQLine", "OnAddKLine", "OnAddELine", "OnDelGLine", "OnDelZLine", "OnDelKLine", "OnDelELine", "OnDelQLine",
25 "OnCleanup", "OnUserPostNick", "OnAccessCheck", "On005Numeric", "OnKill", "OnRemoteKill", "OnLoadModule", "OnUnloadModule",
26 "OnBackgroundTimer", "OnSendList", "OnPreCommand", "OnCheckReady", "OnUserRegister", "OnCheckInvite",
27 "OnCheckKey", "OnCheckLimit", "OnCheckBan", "OnStats", "OnChangeLocalUserHost", "OnChangeLocalUserGecos", "OnLocalTopicChange",
28 "OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnPostConnect", "OnAddBan", "OnDelBan",
29 "OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister",
30 "OnOperCompare", "OnChannelDelete", "OnPostOper", "OnSyncOtherMetaData", "OnSetAway", "OnCancelAway", "OnNamesList",
31 "OnPostCommand", "OnPostJoin", "OnWhoisLine", "OnBuildExemptList", "OnRawSocketConnect", "OnGarbageCollect", NULL
34 extern "C" DllExport Command* init_command(InspIRCd* Instance)
36 return new CommandModules(Instance);
41 CmdResult CommandModules::Handle (const char**, int, User *user)
43 for (unsigned int i = 0; i < ServerInstance->Config->module_names.size(); i++)
45 Version V = ServerInstance->Modules->modules[i]->GetVersion();
46 char modulename[MAXBUF];
47 char flagstate[MAXBUF];
49 if (V.Flags & VF_STATIC)
50 strlcat(flagstate,", static",MAXBUF);
51 if (V.Flags & VF_VENDOR)
52 strlcat(flagstate,", vendor",MAXBUF);
53 if (V.Flags & VF_COMMON)
54 strlcat(flagstate,", common",MAXBUF);
55 if (V.Flags & VF_SERVICEPROVIDER)
56 strlcat(flagstate,", service provider",MAXBUF);
58 strcpy(flagstate," <no flags>");
59 strlcpy(modulename,ServerInstance->Config->module_names[i].c_str(),256);
62 user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->Modules->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
66 user->WriteServ("900 %s :%s",user->nick,ServerConfig::CleanFilename(modulename));
69 user->WriteServ("901 %s :End of MODULES list",user->nick);