]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_h.cpp
Drop channel keys if they are identical to the already-set key (fix for bug #756...
[user/henk/code/inspircd.git] / src / modes / cmode_h.cpp
index 6dd941353fbebcc9484815f73860f6144b887471..c3bb92576e05ddd85172614821c7373a85294c26 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
@@ -77,15 +77,6 @@ void ModeChannelHalfOp::RemoveMode(User*, irc::modestacker* stack)
 
 ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding, bool servermode)
 {
-       /* If halfops are not enabled in the conf, we don't execute
-        * anything in this class at all.
-        */
-       if (!ServerInstance->Config->AllowHalfop)
-       {
-               parameter = "";
-               return MODEACTION_DENY;
-       }
-
        int status = channel->GetStatus(source);
 
        /* Call the correct method depending on wether we're adding or removing the mode */
@@ -125,7 +116,7 @@ std::string ModeChannelHalfOp::AddHalfOp(User *user,const char* dest,Channel *ch
                        {
                                if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)))
                                {
-                                       user->WriteServ("482 %s %s :You're not a channel operator",user->nick, chan->name);
+                                       user->WriteServ("482 %s %s :You're not a channel operator",user->nick.c_str(), chan->name.c_str());
                                        return "";
                                }
                        }
@@ -153,7 +144,7 @@ std::string ModeChannelHalfOp::DelHalfOp(User *user,const char *dest,Channel *ch
                        {
                                if ((user != d) && ((status < STATUS_OP) && (!ServerInstance->ULine(user->server))))
                                {
-                                       user->WriteServ("482 %s %s :You are not a channel operator",user->nick, chan->name);
+                                       user->WriteServ("482 %s %s :You are not a channel operator",user->nick.c_str(), chan->name.c_str());
                                        return "";
                                }
                        }