mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Killed NameError in relaycolor.
This commit is contained in:
parent
4858770ee7
commit
228624861f
@ -263,9 +263,10 @@ class Relay(callbacks.Privmsg):
|
|||||||
nicks, but not the angle brackets. 2 colors both.
|
nicks, but not the angle brackets. 2 colors both.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
self.color = int(privmsgs.getArgs(args))
|
color = int(privmsgs.getArgs(args))
|
||||||
if color != 0 and color != 1 and color != 2:
|
if color != 0 and color != 1 and color != 2:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
|
self.color = color
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise callbacks.ArgumentError
|
raise callbacks.ArgumentError
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
@ -297,7 +298,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
if len(channels) == 1:
|
if len(channels) == 1:
|
||||||
channels = channels[0]
|
channels = channels[0]
|
||||||
else:
|
else:
|
||||||
channels = ', and '.join([', '.join(channels[:-1]), channels[-1]])
|
channels = utils.commaAndify(channels)
|
||||||
if '317' in d:
|
if '317' in d:
|
||||||
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]))
|
||||||
|
Loading…
Reference in New Issue
Block a user