]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_h.cpp
Fix for bug #695. For now, we cant be sure what parts of the code might still use...
[user/henk/code/inspircd.git] / src / modes / cmode_h.cpp
index 8217ccc2d8dedce8cb0bd677a979d59c584ada9c..b50459b87f44d9733b58432fd37b670fd3353c1f 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
@@ -49,7 +49,6 @@ void ModeChannelHalfOp::RemoveMode(Channel* channel, irc::modestacker* stack)
 {
        CUList* clist = channel->GetHalfoppedUsers();
        CUList copy;
-       char moderemove[MAXBUF];
 
        for (CUList::iterator i = clist->begin(); i != clist->end(); i++)
        {
@@ -65,9 +64,8 @@ void ModeChannelHalfOp::RemoveMode(Channel* channel, irc::modestacker* stack)
                }
                else
                {
-                       sprintf(moderemove,"-%c",this->GetModeChar());
-                       const char* parameters[] = { channel->name, moderemove, i->first->nick };
-                       ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+                       std::vector<std::string> parameters; parameters.push_back(channel->name); parameters.push_back("-h"); parameters.push_back(i->first->nick);
+                       ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
                }
        }
 
@@ -127,7 +125,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 "";
                                }
                        }
@@ -155,7 +153,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 "";
                                }
                        }