From 3926fcf5051d77798419096fc2e09df730df5bc9 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 26 Dec 2005 22:10:16 +0000 Subject: Added *experimental* /modules debug git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2672 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_modules.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src') 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 all_opers; extern std::vector 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 { -- cgit v1.2.3