JZTech101

Untitled

Dec 4th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. def _formatPrivmsg(self, nick, network, msg):
  2. channel = msg.args[0]
  3. if self.registryValue('includeNetwork', channel):
  4. networksay = nick +"/" + network + ":"
  5. networkact = "* " + nick +"/" + network
  6. else:
  7. network = ''
  8. # colorize nicks
  9. color = self.registryValue('color', channel) # Also used further down.
  10. if color:
  11. nick = ircutils.IrcString(nick)
  12. newnetworkact, newnetworksay = ircutils.mircColor(networkact, *ircutils.canonicalColor(networkact)), \
  13. ircutils.mircColor(networksay, *ircutils.canonicalColor(networksay))
  14. colors = ircutils.canonicalColor(nick, shift=4)
  15. networkact, networksay = networkact, newnetworksay
  16. if ircmsgs.isAction(msg):
  17. s = format('%s %s', networkact, ircmsgs.unAction(msg))
  18. else:
  19. s = format('%s %s', networksay, msg.args[1])
  20. return s
Advertisement
Add Comment
Please, Sign In to add comment