mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Fixed relaywhois problems.
This commit is contained in:
parent
6bfd991947
commit
af9d8b6c28
@ -253,7 +253,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
irc.error(msg, 'I\'m not on that network.')
|
irc.error(msg, 'I\'m not on that network.')
|
||||||
return
|
return
|
||||||
otherIrc = self.ircs[network]
|
otherIrc = self.ircs[network]
|
||||||
otherIrc.queueMsg(ircmsgs.whois(nick))
|
otherIrc.queueMsg(ircmsgs.whois(nick, nick))
|
||||||
self.whois[(otherIrc, nick)] = (irc, msg, {})
|
self.whois[(otherIrc, nick)] = (irc, msg, {})
|
||||||
|
|
||||||
def relaycolor(self, irc, msg, args):
|
def relaycolor(self, irc, msg, args):
|
||||||
@ -294,6 +294,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
(replyIrc, replyMsg, d) = self.whois[(irc, nick)]
|
(replyIrc, replyMsg, d) = self.whois[(irc, nick)]
|
||||||
hostmask = '@'.join(d['311'].args[2:4])
|
hostmask = '@'.join(d['311'].args[2:4])
|
||||||
|
user = d['311'].args[-1]
|
||||||
channels = d['319'].args[-1].split()
|
channels = d['319'].args[-1].split()
|
||||||
if len(channels) == 1:
|
if len(channels) == 1:
|
||||||
channels = channels[0]
|
channels = channels[0]
|
||||||
@ -303,10 +304,12 @@ class Relay(callbacks.Privmsg):
|
|||||||
idle = utils.timeElapsed(d['317'].args[2])
|
idle = utils.timeElapsed(d['317'].args[2])
|
||||||
signon = time.ctime(float(d['317'].args[3]))
|
signon = time.ctime(float(d['317'].args[3]))
|
||||||
else:
|
else:
|
||||||
idle = signon = '<unknown>'
|
idle = '<unknown>'
|
||||||
|
signon = '<unknown>'
|
||||||
s = '%s (%s) has been online since %s (idle for %s) and is on %s' % \
|
s = '%s (%s) has been online since %s (idle for %s) and is on %s' % \
|
||||||
(nick, hostmask, signon, idle, channels)
|
(user, hostmask, signon, idle, channels)
|
||||||
replyIrc.reply(replyMsg, s)
|
replyIrc.reply(replyMsg, s)
|
||||||
|
del self.whois[(replyIrc, nick)]
|
||||||
|
|
||||||
def _formatPrivmsg(self, nick, network, msg):
|
def _formatPrivmsg(self, nick, network, msg):
|
||||||
# colorize nicks
|
# colorize nicks
|
||||||
|
Loading…
Reference in New Issue
Block a user