X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmode.cpp;h=bddd6cc3190f3d40dfb969f779a2baa194f78a93;hb=19b34cde73ce410fdc335127efe4d7080270feb2;hp=ddc2d4d16c573fbc461b65a1be72d5a59516745e;hpb=be60fccc6ca656636924d28eb1fa870f7e8f0144;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/mode.cpp b/src/mode.cpp index ddc2d4d16..bddd6cc31 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -271,6 +271,8 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool ServerInstance->Log(DEBUG,"ModeParser::Process start"); + LastParse = ""; + /* Special case for displaying the list for listmodes, * e.g. MODE #chan b, or MODE #chan +b without a parameter */ @@ -510,17 +512,11 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool { targetchannel->WriteChannelWithServ(ServerInstance->Config->ServerName, "MODE %s %s%s", targetchannel->name, output_sequence.c_str(), parameter_list.str().c_str()); this->LastParse = targetchannel->name; - LastParse.append(" "); - LastParse.append(output_sequence); - LastParse.append(parameter_list.str()); } else { targetuser->WriteServ("MODE %s %s%s",targetuser->nick,output_sequence.c_str(), parameter_list.str().c_str()); this->LastParse = targetuser->nick; - LastParse.append(" "); - LastParse.append(output_sequence); - LastParse.append(parameter_list.str()); } } else @@ -531,20 +527,18 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool targetchannel->WriteChannel(user,"MODE %s %s%s",targetchannel->name,output_sequence.c_str(),parameter_list.str().c_str()); FOREACH_MOD(I_OnMode,OnMode(user, targetchannel, TYPE_CHANNEL, output_sequence + parameter_list.str())); this->LastParse = targetchannel->name; - LastParse.append(" "); - LastParse.append(output_sequence); - LastParse.append(parameter_list.str()); } else { user->WriteTo(targetuser,"MODE %s %s%s",targetuser->nick,output_sequence.c_str(), parameter_list.str().c_str()); FOREACH_MOD(I_OnMode,OnMode(user, targetuser, TYPE_USER, output_sequence)); this->LastParse = targetuser->nick; - LastParse.append(" "); - LastParse.append(output_sequence); - LastParse.append(parameter_list.str()); } } + + LastParse.append(" "); + LastParse.append(output_sequence); + LastParse.append(parameter_list.str()); } } }