summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-21 14:09:55 -0400
committerAdam <Adam@anope.org>2011-08-21 14:09:55 -0400
commit37c7ca8b87a3a94c7d541f88eec8e234b8d8ec4a (patch)
treed8ba758c1cfa2310ace4fcb4c0651141b8b1cb0f
parent46639707221fb1af96ca60c717e2e4400818e8f7 (diff)
Fixed AddAkiller
-rw-r--r--modules/commands/os_akill.cpp3
-rw-r--r--modules/commands/os_sxline.cpp3
-rw-r--r--modules/pseudoclients/os_main.cpp6
3 files changed, 7 insertions, 5 deletions
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp
index ab35fee1e..296819ca7 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/commands/os_akill.cpp
@@ -205,6 +205,9 @@ class CommandOSAKill : public Command
return;
}
+ if (Config->AddAkiller)
+ reason = "[" + u->nick + "] " + reason;
+
XLine *x = akills->Add(mask, u->nick, expires, reason);
EventReturn MOD_RESULT;
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp
index f949cb7d2..2f0438992 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/commands/os_sxline.cpp
@@ -404,6 +404,9 @@ class CommandOSSNLine : public CommandOSSXLineBase
return;
}
+ if (Config->AddAkiller)
+ reason = "[" + u->nick + "] " + reason;
+
XLine *x = this->xlm()->Add(mask, u->nick, expires, reason);
EventReturn MOD_RESULT;
diff --git a/modules/pseudoclients/os_main.cpp b/modules/pseudoclients/os_main.cpp
index b555b9ede..4ea024744 100644
--- a/modules/pseudoclients/os_main.cpp
+++ b/modules/pseudoclients/os_main.cpp
@@ -22,11 +22,7 @@ class SGLineManager : public XLineManager
XLine *Add(const Anope::string &mask, const Anope::string &creator, time_t expires, const Anope::string &reason)
{
- Anope::string realreason = reason;
- if (!creator.empty() && Config->AddAkiller)
- realreason = "[" + creator + "] " + reason;
-
- XLine *x = new XLine(mask, creator, expires, realreason);
+ XLine *x = new XLine(mask, creator, expires, reason);
this->AddXLine(x);