diff --git a/LinkRelay/plugin.py b/LinkRelay/plugin.py index 09e26b7..35ef847 100644 --- a/LinkRelay/plugin.py +++ b/LinkRelay/plugin.py @@ -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) diff --git a/LinkRelay/test.py b/LinkRelay/test.py index 8d4c36f..79fdf71 100644 --- a/LinkRelay/test.py +++ b/LinkRelay/test.py @@ -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 ""')