diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-27 18:28:26 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-27 18:28:26 +0000 |
commit | 108cf5e60d43486235349bce3ae7aa8b2b4dae7f (patch) | |
tree | 07333fab76a470a472a3d63bdd4eb53c23be23f1 /src | |
parent | 6b9c0fe4d920418478c145a9fe746e4ca83f8d89 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/inspircd12.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 0fc07852d..7f1262df1 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -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); } |