mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made Relay use ircutils.canonicalColor.
This commit is contained in:
parent
1891a46894
commit
33f2818398
@ -261,15 +261,11 @@ class Relay(callbacks.Privmsg):
|
||||
|
||||
def _formatPrivmsg(self, nick, abbreviation, msg):
|
||||
# colorize nicks
|
||||
colorNumber = (hash(nick) % 14) + 2
|
||||
nick = ircutils.canonicalColor(nick)
|
||||
if ircmsgs.isAction(msg):
|
||||
return '* %s@%s %s' % \
|
||||
(ircutils.mircColor(nick, colorNumber), abbreviation,
|
||||
ircmsgs.unAction(msg))
|
||||
return '* %s@%s %s' % (nick, abbreviation, ircmsgs.unAction(msg))
|
||||
else:
|
||||
return '<%s@%s> %s' % \
|
||||
(ircutils.mircColor(nick, colorNumber),
|
||||
abbreviation, msg.args[1])
|
||||
return '<%s@%s> %s' % (nick, abbreviation, msg.args[1])
|
||||
|
||||
def doPrivmsg(self, irc, msg):
|
||||
callbacks.Privmsg.doPrivmsg(self, irc, msg)
|
||||
|
Loading…
Reference in New Issue
Block a user