X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodes%2Fcmode_o.cpp;h=fe40adba6af68211f346a5a27fc21b4eda3ee35b;hb=4b856bda135a08e800b96c970a10b0b6a34d433a;hp=3105d64aeff2c92727b12f504bdf9f0e6a8c008a;hpb=2a8025dba842a775936f8a19cb6d01559f26a141;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index 3105d64ae..fe40adba6 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -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 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 ""; } }