LinkRelay: add config variable colors.msg

master
Valentin Lorentz 2011-05-13 17:40:29 +02:00
parent d504b05645
commit 2913551333
2 changed files with 6 additions and 2 deletions

View File

@ -86,6 +86,7 @@ conf.registerGlobalValue(LinkRelay, 'substitutes',
conf.registerGroup(LinkRelay, 'colors')
for name, color in {'info': '02',
'msg': '14',
'truncated': '14',
'mode': '14',
'join': '14',

View File

@ -122,12 +122,15 @@ class LinkRelay(callbacks.Plugin):
text = text.strip('\x01')
text = text[ 7 : ]
if colored:
s = '\x0314*\x03 %s %s' % (nick, text)
s = '\x03%s*\x03 %s %s' % (nick,
self.registryValue('colors.msg'),
text)
else:
s = '* %s %s' % (nick, text)
else:
if colored:
s = '\x0314<%s%s\x0314>\x03 %s' % (color, nick, text)
s = '\x03%s<%s%s\x0314>\x03 %s' % \
(self.registryValue('colors.msg'), color, nick, text)
else:
s = '<%s%s> %s' % (color, nick, text)
return s