Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _formatPrivmsg(self, nick, network, msg):
- channel = msg.args[0]
- if self.registryValue('includeNetwork', channel):
- network = network
- else:
- network = ''
- sas="/"
- # colorize nicks
- color = self.registryValue('color', channel) # Also used further down.
- if color:
- nick = ircutils.IrcString(nick)
- newnick = ircutils.mircColor(nick, *ircutils.canonicalColor(nick))
- colors = ircutils.canonicalColor(nick, shift=4)
- nick = newnick
- if ircmsgs.isAction(msg):
- if color:
- t = ircutils.mircColor('*', *colors)
- else:
- t = '*'
- s = format('%s %s%s %s', t, nick,sas, '%s %s%s %s', network, ircmsgs.unAction(msg))
- else:
- if color:
- lt = ircutils.mircColor('<', *colors)
- gt = ircutils.mircColor('>', *colors)
- else:
- lt = '<'
- gt = '>'
- s = format('%s%s%s%s %s', lt, nick,sas,'%s%s%s%s %s', network, gt, msg.args[1])
- return s
Advertisement
Add Comment
Please, Sign In to add comment