]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/umode_o.cpp
Make User:: nick/ident/dhost/fullname and some other things std::string instead of...
[user/henk/code/inspircd.git] / src / modes / umode_o.cpp
index 30ed089f6e0cf38c0ae566cf1217c9776a891058..7cee7d2382d64f8c452cb1af35cb5d6aa906326e 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -21,10 +21,10 @@ ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, '
 {
 }
 
-ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode)
 {
        /* Only opers can execute this class at all */
-       if (!*source->oper)
+       if (!IS_OPER(source))
                return MODEACTION_DENY;
 
        /* Not even opers can GIVE the +o mode, only take it away */
@@ -35,9 +35,9 @@ ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanre
         * Note that oper status is only given in cmd_oper.cpp
         * NOT here. It is impossible to directly set +o without
         * verifying as an oper and getting an opertype assigned
-        * to your userrec!
+        * to your User!
         */
-       ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick, source->nick);
+       ServerInstance->SNO->WriteToSnoMask('o', "User %s de-opered (by %s)", dest->nick.c_str(), source->nick.c_str());
        dest->UnOper();
 
        return MODEACTION_ALLOW;
@@ -45,5 +45,5 @@ ModeAction ModeUserOperator::OnModeChange(userrec* source, userrec* dest, chanre
 
 unsigned int ModeUserOperator::GetCount()
 {
-       return ServerInstance->all_opers.size();
+       return count;
 }