LinkRelay: Use irc.replies instead of multiple irc.reply. Closes GH-68.

master
Valentin Lorentz 2013-07-07 13:25:07 +02:00
parent 09ea6374d8
commit f90ecdc4cf
1 changed files with 3 additions and 1 deletions

View File

@ -160,6 +160,7 @@ class LinkRelay(callbacks.Plugin):
irc.reply(_('This is no relay enabled. Use "linkrelay add" to '
'add one.'))
return
replies = []
for relay in self.relays:
if world.getIrc(relay.targetNetwork):
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'
if not self.registryValue('color', msg.args[0]):
s = s.replace('\x02', '')
irc.reply(s %
replies.append(s %
(relay.sourceChannel,
relay.sourceNetwork,
relay.targetChannel,
relay.targetNetwork,
hasIRC))
irc.replies(replies)
def doPrivmsg(self, irc, msg):
channel = msg.args[0]