X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_modules.cpp;h=0e5b12672dfaeeb5879212218c930c0cf22ab8fe;hb=bb81e1a5f38b1d6487e53aa5ac69ca7ced9f6562;hp=4a7b3b25daf11a7eb649fd85b455edb29a039bc3;hpb=872372d4bff7fa415e67e7a4083d454b529dce45;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_modules.cpp b/src/cmd_modules.cpp index 4a7b3b25d..0e5b12672 100644 --- a/src/cmd_modules.cpp +++ b/src/cmd_modules.cpp @@ -2,10 +2,10 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * Inspire is copyright (C) 2002-2005 ChatSpike-Dev. + * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. * E-mail: - * - * + * + * * * Written by Craig Edwards, Craig McLure, and others. * This program is free but copyrighted software; see @@ -57,10 +57,10 @@ extern std::vector factory; extern time_t TIME; extern user_hash clientlist; extern chan_hash chanlist; -extern whowas_hash whowas; + extern std::vector all_opers; extern std::vector local_users; -extern userrec* fd_ref_table[65536]; +extern userrec* fd_ref_table[MAX_DESCRIPTORS]; char* itab[] = { "OnUserConnect", "OnUserQuit", "OnUserDisconnect", "OnUserJoin", "OnUserPart", "OnRehash", "OnServerRaw", @@ -74,7 +74,7 @@ char* itab[] = { "OnCheckKey", "OnCheckLimit", "OnCheckBan", "OnStats", "OnChangeLocalUserHost", "OnChangeLocalUserGecos", "OnLocalTopicChange", "OnPostLocalTopicChange", "OnEvent", "OnRequest", "OnOperCompre", "OnGlobalOper", "OnGlobalConnect", "OnAddBan", "OnDelBan", "OnRawSocketAccept", "OnRawSocketClose", "OnRawSocketWrite", "OnRawSocketRead", "OnChangeLocalUserGECOS", "OnUserRegister", - "OnOperCompare", NULL + "OnOperCompare", "OnChannelDelete", "OnPostOper", "OnSyncOtherMetaData", "OnSetAway", "OnCancelAway", NULL }; void cmd_modules::Handle (char **parameters, int pcnt, userrec *user) @@ -96,7 +96,7 @@ void cmd_modules::Handle (char **parameters, int pcnt, userrec *user) if (!flagstate[0]) strcpy(flagstate," "); strlcpy(modulename,Config->module_names[i].c_str(),256); - if (strchr(user->modes,'o')) + if (*user->oper) { if ((pcnt >= 2) && (!strcasecmp(parameters[0],"debug"))) { @@ -110,10 +110,13 @@ void cmd_modules::Handle (char **parameters, int pcnt, userrec *user) *dlist = 0; for (int v = 0; v < 4; v++) { - if ((itab[it]) && (Config->implement_lists[i][it])) + if (itab[it]) { - snprintf(data,MAXBUF,"%s=>%c ",itab[it],(Config->implement_lists[i][it] ? '1' : '0')); - strncat(dlist,data,MAXBUF); + if (Config->implement_lists[i][it]) + { + snprintf(data,MAXBUF,"%s=>%c ",itab[it],(Config->implement_lists[i][it] ? '1' : '0')); + strncat(dlist,data,MAXBUF); + } it++; } }