1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 15:23:13 +02:00

Possible bugfix for bug #1086, specifically the issue with the inspircd12 sending ADDKILL from the servername instead of a SID or UID and with a negative expire time.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2340 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-06-27 18:28:26 +00:00
parent 6b9c0fe4d9
commit 108cf5e60d
+4 -3
View File
@@ -508,9 +508,10 @@ 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)
if (timeleft > 172800 || !expires)
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);
BotInfo *bi = findbot(s_OperServ);
send_cmd(bi->uid, "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)
@@ -678,7 +679,7 @@ class InspIRCdProto : public IRCDProto
void SendSWhois(const char *source, const char *who, const char *mask)
{
User *u = finduser(who);
send_cmd(TS6SID, "METADATA %s swhois :%s", u->GetUID().c_str(), mask);
}