From 36de15de5e89a00f10fb57c1029b6f6eaefe24e7 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Mon, 23 Feb 2009 03:18:38 +0000 Subject: 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 --- src/protocol/inspircd11.c | 5 +++-- src/protocol/inspircd12.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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(when), static_cast(timeleft), reason); + if (timeleft > 172800) + timeleft = 172800; + send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast(time(NULL)), static_cast(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(when), static_cast(timeleft), reason); + send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast(time(NULL)), static_cast(timeleft), reason); } void SendSVSKillInternal(const char *source, const char *user, const char *buf) -- cgit