]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_modules.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / cmd_modules.cpp
index 4a7b3b25daf11a7eb649fd85b455edb29a039bc3..0a7108267f728aa93e71facdff2439ac6a3b9646 100644 (file)
@@ -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:
- *                <brain.net>
- *                <Craig.net>
+ *                <brain@chatspike.net>
+ *                <Craig@chatspike.net>
  *
  * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
@@ -60,7 +60,7 @@ extern chan_hash chanlist;
 extern whowas_hash whowas;
 extern std::vector<userrec*> all_opers;
 extern std::vector<userrec*> 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,"  <no flags>");
                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++;
                                                        }
                                                }