diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-23 03:18:38 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-23 03:18:38 +0000 |
commit | 36de15de5e89a00f10fb57c1029b6f6eaefe24e7 (patch) | |
tree | 7850fd2a6518e434f8ee4c5892fa2235efd3cc81 | |
parent | ab6ee16aa24ea1b620102c07c33d4e014b16e4d9 (diff) |
Fix SendAkill() in inspircd* modules, they were sending the wrong timestamp (instead of sending the current time, they were sending the time of the akill's creation).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2131 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/protocol/inspircd11.c | 5 | ||||
-rw-r--r-- | src/protocol/inspircd12.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 0195768de..187dbcddf 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -502,8 +502,9 @@ class InspIRCdProto : public IRCDProto { // Calculate the time left before this would expire, capping it at 2 days time_t timeleft = expires - time(NULL); - if (timeleft > 172800) timeleft = 172800; - send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(when), static_cast<long>(timeleft), reason); + if (timeleft > 172800) + timeleft = 172800; + send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason); } void SendSVSKillInternal(const char *source, const char *user, const char *buf) diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index f7be33fab..8b5161c96 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -507,7 +507,7 @@ class InspIRCdProto : public IRCDProto time_t timeleft = expires - time(NULL); if (timeleft > 172800) timeleft = 172800; - send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long int>(when), static_cast<long int>(timeleft), reason); + send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason); } void SendSVSKillInternal(const char *source, const char *user, const char *buf) |