LinkRelay: Use irc.replies instead of multiple irc.reply. Closes GH-68.
parent
09ea6374d8
commit
f90ecdc4cf
|
@ -160,6 +160,7 @@ class LinkRelay(callbacks.Plugin):
|
||||||
irc.reply(_('This is no relay enabled. Use "linkrelay add" to '
|
irc.reply(_('This is no relay enabled. Use "linkrelay add" to '
|
||||||
'add one.'))
|
'add one.'))
|
||||||
return
|
return
|
||||||
|
replies = []
|
||||||
for relay in self.relays:
|
for relay in self.relays:
|
||||||
if world.getIrc(relay.targetNetwork):
|
if world.getIrc(relay.targetNetwork):
|
||||||
hasIRC = 'Link healthy!'
|
hasIRC = 'Link healthy!'
|
||||||
|
@ -169,12 +170,13 @@ class LinkRelay(callbacks.Plugin):
|
||||||
s ='\x02%s\x02 on \x02%s\x02 ==> \x02%s\x02 on \x02%s\x02. %s'
|
s ='\x02%s\x02 on \x02%s\x02 ==> \x02%s\x02 on \x02%s\x02. %s'
|
||||||
if not self.registryValue('color', msg.args[0]):
|
if not self.registryValue('color', msg.args[0]):
|
||||||
s = s.replace('\x02', '')
|
s = s.replace('\x02', '')
|
||||||
irc.reply(s %
|
replies.append(s %
|
||||||
(relay.sourceChannel,
|
(relay.sourceChannel,
|
||||||
relay.sourceNetwork,
|
relay.sourceNetwork,
|
||||||
relay.targetChannel,
|
relay.targetChannel,
|
||||||
relay.targetNetwork,
|
relay.targetNetwork,
|
||||||
hasIRC))
|
hasIRC))
|
||||||
|
irc.replies(replies)
|
||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
|
|
Loading…
Reference in New Issue