diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 22:10:16 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 22:10:16 +0000 |
commit | 3926fcf5051d77798419096fc2e09df730df5bc9 (patch) | |
tree | 375a3dd5d03b246d3d2235b07ee882ac9641ecd7 /src | |
parent | f95fc3c6a89a6e5996fe93b0da4f93dd09e3588d (diff) |
Added *experimental* /modules debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2672 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_modules.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/cmd_modules.cpp b/src/cmd_modules.cpp index bdff5c7f8..ac25f1888 100644 --- a/src/cmd_modules.cpp +++ b/src/cmd_modules.cpp @@ -62,6 +62,21 @@ extern std::vector<userrec*> all_opers; extern std::vector<userrec*> local_users; extern userrec* fd_ref_table[65536]; +char* itab[] = { +"OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw", +"OnExtendedMode", "OnUserPreJoin", "OnUserPreKick", "OnUserKick", "OnOper", "OnInfo", "OnWhois", "OnUserPreInvite", +"OnUserInvite", "OnUserPreMessage", "OnUserPreNotice", "OnUserPreNick", "OnUserMessage", "OnUserNotice", "OnMode", +"OnGetServerDescription", "OnSyncUser", "OnSyncChannel", "OnSyncChannelMetaData", "OnSyncUserMetaData", +"OnDecodeMetaData", "ProtoSendMode", "ProtoSendMetaData", "OnWallops", "OnChangeHost", "OnChangeName", "OnAddGLine", +"OnAddZLine", "OnAddQLine", "OnAddKLine", "OnAddELine", "OnDelGLine", "OnDelZLine", "OnDelKLine", "OnDelELine", "OnDelQLine", +"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", +"OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister", +"OnOperCompare", NULL +}; + void cmd_modules::Handle (char **parameters, int pcnt, userrec *user) { for (unsigned int i = 0; i < Config->module_names.size(); i++) @@ -83,7 +98,16 @@ void cmd_modules::Handle (char **parameters, int pcnt, userrec *user) strlcpy(modulename,Config->module_names[i].c_str(),256); if (strchr(user->modes,'o')) { - WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,CleanFilename(modulename),flagstate+2); + if ((pcnt > 0) && (!strcasecmp(parameters[0],"debug"))) + { + WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,CleanFilename(modulename),flagstate+2); + for (int it = 0; itab[it]; it++) + WriteServ(user->fd,"900 %s :%s [%s = %d]",user->nick,CleanFilename(modulename),itab[it],Config->implement_lists[i]); + } + else + { + WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,CleanFilename(modulename),flagstate+2); + } } else { |