X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_shun.cpp;h=66cc7fd58dc488e2a4585d57d76ffa9675bc1ac0;hb=451e687f681ccab5c02a8de1a7d59b324efbfe08;hp=28faf898b061aa0d6bb3247285b8baed8fa072e6;hpb=e191f0ed6cdca421407ebc67c28fafabc6cc63f7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 28faf898b..66cc7fd58 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -106,13 +106,17 @@ class CommandShun : public Command if (parameters.size() == 1) { - if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user)) + if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SHUN", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s removed SHUN on %s", user->nick.c_str(), parameters[0].c_str()); + } + else if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user)) + { + ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s", user->nick.c_str(), target.c_str()); } else { - user->WriteNotice("*** Shun " + target + " not found in list, try /stats H."); + user->WriteNotice("*** Shun " + parameters[0] + " not found in list, try /stats H."); return CMD_FAILURE; } } @@ -217,10 +221,10 @@ class ModuleShun : public Module ShunEnabledCommands.clear(); - std::stringstream dcmds(cmds); + irc::spacesepstream dcmds(cmds); std::string thiscmd; - while (dcmds >> thiscmd) + while (dcmds.GetToken(thiscmd)) { ShunEnabledCommands.insert(thiscmd); }