summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-11-07 18:18:35 +0000
committerPeter Powell <petpow@saberuk.com>2017-11-09 11:16:32 +0000
commitf57dbb6dbe0a49b0f0aa80c327904d4273a76b55 (patch)
treeca69eb421c2a706ec3ed9039c2bc0e7ad298f383 /src/modules
parente83506b7abde9fdd628b9065fb3b6c01d370808f (diff)
Work around removing shuns on nicks when the nick is online.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_shun.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 8bf4d30e7..3147d5476 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -114,13 +114,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(), 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->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats H.",user->nick.c_str(),target.c_str());
+ user->WriteServ("NOTICE %s :*** Shun %s not found in list, try /stats H.", user->nick.c_str(), parameters[0].c_str());
return CMD_FAILURE;
}
}