]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Fix --with-max-clients not taking a parameter (reported by erich)
[user/henk/code/inspircd.git] / src / mode.cpp
index d56e6ec38436eb4eff647cadded889d3ca41b09f..dfa846364f95366e969ec67cae99346fc750f17f 100644 (file)
@@ -2,20 +2,15 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                      E-mail:
- *             <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
- *         the file COPYING for details.
+ *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include "inspircd.h"
 #include "users.h"
 #include "modules.h"
@@ -254,6 +249,7 @@ void ModeParser::DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec
                else
                {
                        user->WriteServ("502 %s :Can't change mode for other users", user->nick);
+                       return;
                }
        }
 
@@ -271,8 +267,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
        userrec* targetuser  = ServerInstance->FindNick(parameters[0]);
 
        ServerInstance->Log(DEBUG,"ModeParser::Process start: pcnt=%d",pcnt);
-       for (int j = 0; j < pcnt; j++)
-               ServerInstance->Log(DEBUG,"    parameters[%d] = '%s'", j, parameters[j]);
 
        LastParse = "";
 
@@ -380,8 +374,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
                {
                        unsigned char modechar = *letter;
 
-                       ServerInstance->Log(DEBUG,"Process letter %c", modechar);
-
                        switch (modechar)
                        {
                                /* NB:
@@ -646,13 +638,13 @@ bool ModeParser::DelMode(ModeHandler* mh)
        switch (mh->GetModeType())
        {
                case MODETYPE_USER:
-                       for (user_hash::iterator i = ServerInstance->clientlist.begin(); i != ServerInstance->clientlist.end(); i++)
+                       for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++)
                        {
                                mh->RemoveMode(i->second);
                        }
                break;
                case MODETYPE_CHANNEL:
-                       for (chan_hash::iterator i = ServerInstance->chanlist.begin(); i != ServerInstance->chanlist.end(); i++)
+                       for (chan_hash::iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); i++)
                        {
                                mh->RemoveMode(i->second);
                        }