diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 22:08:45 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 22:08:45 +0000 |
commit | 7ea34be0b8dad292095a99307ebcaba28c7b3a59 (patch) | |
tree | 8c4c594d55426635c290ba18cdc977c80db20ef8 /src | |
parent | 6bd851a4d05d912d4bc33bd1f35b2f2c14e4f29f (diff) |
Fix output of reason in os_chankill when AddAkiller is used, spotted by DukePyrolator, thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2099 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/os_chankill.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index bb6437931..3f65570de 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -27,7 +27,7 @@ class CommandOSChanKill : public Command CommandReturn Execute(User *u, std::vector<std::string> ¶ms) { const char *expiry, *channel; - char reason[BUFSIZE]; + char reason[BUFSIZE], realreason[BUFSIZE]; time_t expires; char mask[USERMAX + HOSTMAX + 2]; struct c_userlist *cu, *next; @@ -65,7 +65,9 @@ class CommandOSChanKill : public Command { if (AddAkiller) - snprintf(reason, sizeof(reason), "[%s] %s", u->nick, reason); + snprintf(realreason, sizeof(realreason), "[%s] %s", u->nick, reason); + else + snprintf(realreason, sizeof(realreason), "%s", reason); if ((c = findchan(channel))) { @@ -76,11 +78,11 @@ class CommandOSChanKill : public Command continue; strncpy(mask, "*@", 3); /* Use *@" for the akill's, */ strncat(mask, cu->user->host, HOSTMAX); - add_akill(NULL, mask, s_OperServ, expires, reason); + add_akill(NULL, mask, s_OperServ, expires, realreason); check_akill(cu->user->nick, cu->user->GetIdent().c_str(), cu->user->host, NULL, NULL); } if (WallOSAkill) - ircdproto->SendGlobops(s_OperServ, "%s used CHANKILL on %s (%s)", u->nick, channel, reason); + ircdproto->SendGlobops(s_OperServ, "%s used CHANKILL on %s (%s)", u->nick, channel, realreason); } else notice_lang(s_OperServ, u, CHAN_X_NOT_IN_USE, channel); |