]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Add Ankit to regular contributors list
[user/henk/code/inspircd.git] / src / users.cpp
index 851e0a1d66e8b891b520064553e28c1525819ea8..fd71b07ad9a518b46a14f8461f0f110f43100751 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -543,18 +543,15 @@ bool User::HasPrivPermission(const std::string &privstr, bool noisy)
 
        if (AllowedPrivs->find(privstr) != AllowedPrivs->end())
        {
-               ServerInstance->Logs->Log("PRIVS", DEBUG, "I do have it.");             
                return true;
        }
        else if (AllowedPrivs->find("*") != AllowedPrivs->end())
        {
-               ServerInstance->Logs->Log("PRIVS", DEBUG, "I allow all.");
                return true;
        }
 
        if (noisy)
                this->WriteServ("NOTICE %s :Oper type %s does not have access to priv %s", this->nick.c_str(), this->oper.c_str(), privstr.c_str());
-       ServerInstance->Logs->Log("PRIVS", DEBUG, "I don't have it...");
        return false;
 }
 
@@ -839,6 +836,7 @@ void User::UnOper()
                 */
                this->oper.clear();
 
+
                /* Remove all oper only modes from the user when the deoper - Bug #466*/
                std::string moderemove("-");
 
@@ -849,12 +847,13 @@ void User::UnOper()
                                moderemove += letter;
                }
 
+
                std::vector<std::string> parameters;
                parameters.push_back(this->nick);
                parameters.push_back(moderemove);
 
                ServerInstance->Parser->CallHandler("MODE", parameters, this);
-                       
+
                /* remove the user from the oper list. Will remove multiple entries as a safeguard against bug #404 */
                ServerInstance->Users->all_opers.remove(this);
 
@@ -872,6 +871,7 @@ void User::UnOper()
 
                AllowedUserModes.reset();
                AllowedChanModes.reset();
+               this->modes[UM_OPERATOR] = 0;
        }
 }
 
@@ -1038,8 +1038,12 @@ bool User::ForceNickChange(const char* newnick)
 
        this->InvalidateCache();
 
+       this->Extend("NICKForced", "Enabled");
+
        FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(this, newnick));
 
+       this->Shrink("NICKForced");
+
        if (MOD_RESULT)
        {
                ServerInstance->stats->statsCollisions++;