From 20f7a93170234d5871f295e9f5eb1fc1a98344d0 Mon Sep 17 00:00:00 2001 From: GLolol Date: Sun, 27 Oct 2013 12:38:52 -0700 Subject: [PATCH] LinkRelay: disallow nesting for list & nicks cmds also: made a note that nicksToIgnore.nicks takes a space seperated list! --- LinkRelay/config.py | 2 +- LinkRelay/plugin.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LinkRelay/config.py b/LinkRelay/config.py index 4ef5a0a..444c5d6 100644 --- a/LinkRelay/config.py +++ b/LinkRelay/config.py @@ -81,7 +81,7 @@ conf.registerChannelValue(LinkRelay, 'includeNetwork', conf.registerGroup(LinkRelay, 'nickstoIgnore') conf.registerChannelValue(LinkRelay.nickstoIgnore, 'nicks', registry.SpaceSeparatedListOfStrings('', _("""Determines a list of nicks for the bot to - ignore."""))) + ignore (takes a space-seperated list)."""))) conf.registerChannelValue(LinkRelay.nickstoIgnore, 'affectPrivmsgs', registry.Boolean(True, _("""Determines whether the bot will ignore PRIVMSGs from the nicks listed in nicksToIgnore. If set to False, the bot will only diff --git a/LinkRelay/plugin.py b/LinkRelay/plugin.py index cf73968..351a87c 100644 --- a/LinkRelay/plugin.py +++ b/LinkRelay/plugin.py @@ -160,7 +160,9 @@ class LinkRelay(callbacks.Plugin): """takes no arguments Returns all the defined relay links""" - if not self.relays: + if irc.nested: + irc.error('This command cannot be nested.', Raise=True) + elif not self.relays: irc.reply(_('This is no relay enabled. Use "linkrelay add" to ' 'add one.')) return @@ -378,6 +380,8 @@ class LinkRelay(callbacks.Plugin): Returns the nicks of the people in the linked channels. is only necessary if the message isn't sent on the channel itself.""" + if irc.nested: + irc.error('This command cannot be nested.', Raise=True) for relay in self.relays: if relay.sourceChannel == channel and \ relay.sourceNetwork == irc.network: