mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-06 19:43:47 -05:00
LinkRelay: use string interpolation, not addition
This commit is contained in:
parent
382570b098
commit
bea3904e6b
@ -247,7 +247,7 @@ class LinkRelay(callbacks.Plugin):
|
|||||||
if self.registryValue('color', msg.args[0]):
|
if self.registryValue('color', msg.args[0]):
|
||||||
args['color'] = '\x03%s' % self.registryValue('colors.join', msg.args[0])
|
args['color'] = '\x03%s' % self.registryValue('colors.join', msg.args[0])
|
||||||
if self.registryValue('hostmasks', msg.args[0]):
|
if self.registryValue('hostmasks', msg.args[0]):
|
||||||
args['userhost'] = ' (' + msg.user + '@' + msg.host + ')'
|
args['userhost'] = '%s%s%s%s%s' % (' (', msg.user, '@', msg.host, ')')
|
||||||
s = '%(color)s' + _('JOIN: %(nick)s%(sepTagn)s%(network)s'
|
s = '%(color)s' + _('JOIN: %(nick)s%(sepTagn)s%(network)s'
|
||||||
'%(userhost)s has joined %(channel)s%(sepTagc)s'
|
'%(userhost)s has joined %(channel)s%(sepTagc)s'
|
||||||
'%(network)s')
|
'%(network)s')
|
||||||
@ -263,9 +263,9 @@ class LinkRelay(callbacks.Plugin):
|
|||||||
if self.registryValue('color', msg.args[0]):
|
if self.registryValue('color', msg.args[0]):
|
||||||
args['color'] = '\x03%s' % self.registryValue('colors.part', msg.args[0])
|
args['color'] = '\x03%s' % self.registryValue('colors.part', msg.args[0])
|
||||||
if self.registryValue('hostmasks', msg.args[0]):
|
if self.registryValue('hostmasks', msg.args[0]):
|
||||||
args['userhost'] = ' (' + msg.user + '@' + msg.host + ')'
|
args['userhost'] = '%s%s%s%s%s' % (' (', msg.user, '@', msg.host, ')')
|
||||||
try:
|
try:
|
||||||
args['message'] = ' (' + msg.args[1] + ')'
|
args['message'] = '%s%s%s' % (' (', msg.args[1], ')')
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
s = '%(color)s' + _('PART: %(nick)s%(sepTagn)s%(network)s'
|
s = '%(color)s' + _('PART: %(nick)s%(sepTagn)s%(network)s'
|
||||||
@ -308,8 +308,6 @@ class LinkRelay(callbacks.Plugin):
|
|||||||
'message': msg.args[0], 'color': '', 'userhost': ''}
|
'message': msg.args[0], 'color': '', 'userhost': ''}
|
||||||
if self.registryValue('color', msg.args[0]):
|
if self.registryValue('color', msg.args[0]):
|
||||||
args['color'] = '\x03%s' % self.registryValue('colors.quit', msg.args[0])
|
args['color'] = '\x03%s' % self.registryValue('colors.quit', msg.args[0])
|
||||||
if self.registryValue('hostmasks', msg.args[0]):
|
|
||||||
args['userhost'] = ' (' + msg.user + '@' + msg.host + ')'
|
|
||||||
s = '%(color)s' + _('QUIT: %(nick)s%(sepTagn)s%(network)s'
|
s = '%(color)s' + _('QUIT: %(nick)s%(sepTagn)s%(network)s'
|
||||||
' has quit (%(message)s)')
|
' has quit (%(message)s)')
|
||||||
self.sendToOthers(irc, None, s, args, msg.nick)
|
self.sendToOthers(irc, None, s, args, msg.nick)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user