X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_modules.cpp;h=be236fcd92dec16ffbb6b6a6e315befe829339d1;hb=cd7657bddc7a6dc2e7326077d173a874bf71f6bd;hp=c6c83df0353234e1c2515d57c5964f43500e3ba3;hpb=60b105a2a90bd107e84b6a57a059e512e1244be1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_modules.cpp b/src/cmd_modules.cpp index c6c83df03..be236fcd9 100644 --- a/src/cmd_modules.cpp +++ b/src/cmd_modules.cpp @@ -26,7 +26,7 @@ char* itab[] = { "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", "OnCheckInvite", + "OnBackgroundTimer", "OnSendList", "OnPreCommand", "OnCheckReady", "OnUserRegister", "OnCheckInvite", "OnCheckKey", "OnCheckLimit", "OnCheckBan", "OnStats", "OnChangeLocalUserHost", "OnChangeLocalUserGecos", "OnLocalTopicChange", "OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnPostConnect", "OnAddBan", "OnDelBan", "OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister", @@ -34,7 +34,7 @@ char* itab[] = { "OnPostCommand", "OnPostJoin", "OnWhoisLine", "OnBuildExemptList", "OnRawSocketConnect", "OnGarbageCollect", NULL }; -extern "C" command_t* init_command(InspIRCd* Instance) +extern "C" DllExport command_t* init_command(InspIRCd* Instance) { return new cmd_modules(Instance); } @@ -60,45 +60,9 @@ CmdResult cmd_modules::Handle (const char** parameters, int pcnt, userrec *user) if (!flagstate[0]) strcpy(flagstate," "); strlcpy(modulename,ServerInstance->Config->module_names[i].c_str(),256); - if (*user->oper) + if (IS_OPER(user)) { - if ((pcnt >= 2) && (!strcasecmp(parameters[0],"debug"))) - { - if (match(ServerInstance->Config->module_names[i].c_str(),parameters[1])) - { - user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2); - for (int it = 0; itab[it];) - { - char data[MAXBUF]; - char dlist[MAXBUF]; - *dlist = 0; - for (int v = 0; v < 4; v++) - { - if (itab[it]) - { - if (ServerInstance->Config->implement_lists[i][it]) - { - snprintf(data,MAXBUF,"%s=>%c ",itab[it],(ServerInstance->Config->implement_lists[i][it] ? '1' : '0')); - strlcat(dlist,data,MAXBUF); - } - it++; - } - } - if (*dlist) - user->WriteServ("900 %s :%s [ %s]",user->nick,ServerConfig::CleanFilename(modulename),dlist); - } - user->WriteServ("900 %s :=== DEBUG: Implementation counts ===",user->nick); - for (int it = 0; itab[it]; it++) - { - if (ServerInstance->Config->global_implementation[it]) - user->WriteServ("900 %s :%s: %d times",user->nick, itab[it],(int)ServerInstance->Config->global_implementation[it]); - } - } - } - else - { - user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2); - } + user->WriteServ("900 %s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,ServerInstance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2); } else {