]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_o.cpp
Make User:: nick/ident/dhost/fullname and some other things std::string instead of...
[user/henk/code/inspircd.git] / src / modes / cmode_o.cpp
index 3105d64aeff2c92727b12f504bdf9f0e6a8c008a..fe40adba6af68211f346a5a27fc21b4eda3ee35b 100644 (file)
@@ -50,7 +50,6 @@ void ModeChannelOp::RemoveMode(Channel* channel, irc::modestacker* stack)
 {
        CUList* clist = channel->GetOppedUsers();
        CUList copy;
-       char moderemove[MAXBUF];
 
        for (CUList::iterator i = clist->begin(); i != clist->end(); i++)
        {
@@ -64,9 +63,8 @@ void ModeChannelOp::RemoveMode(Channel* channel, irc::modestacker* stack)
                        stack->Push(this->GetModeChar(), i->first->nick);
                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("-o"); parameters.push_back(i->first->nick);
+                       ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
                }
        }
 }
@@ -116,7 +114,7 @@ std::string ModeChannelOp::AddOp(User *user,const char* dest,Channel *chan,int s
                        {
                                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);
                                        return "";
                                }
                        }
@@ -144,7 +142,7 @@ std::string ModeChannelOp::DelOp(User *user,const char *dest,Channel *chan,int s
                        {
                                if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)) && (IS_LOCAL(user)))
                                {
-                                       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);
                                        return "";
                                }
                        }