LinkRelay: bug fix.

master
Valentin Lorentz 2011-07-06 10:40:49 +02:00
parent 4515d1e594
commit c681ecb7c5
2 changed files with 6 additions and 5 deletions

View File

@ -289,10 +289,11 @@ class LinkRelay(callbacks.Plugin):
self.log.info('LinkRelay: I\'m not in in %s on %s' %
(relay.targetChannel, relay.targetNetwork))
else:
if self.registryValue('includeNetwork', relay.targetChannel):
s = s % ('@' + irc.network)
else:
s = s % ''
if '%s' in s:
if self.registryValue('includeNetwork', relay.targetChannel):
s = s % ('@' + irc.network)
else:
s = s % ''
if isPrivmsg or \
self.registryValue('nonPrivmsgs', channel) == 'privmsg':
msg = ircmsgs.privmsg(relay.targetChannel, s)

View File

@ -31,7 +31,7 @@
from supybot.test import *
class LinkRelayTestCase(ChannelPluginTestCase):
plugins = ('LinkRelay','Config')
plugins = ('LinkRelay','Config', 'User')
def testAdd(self):
self.assertNotError('config supybot.plugins.LinkRelay.relays ""')