mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-30 23:41:07 -05:00
LinkRelay: disallow nesting for list & nicks cmds
also: made a note that nicksToIgnore.nicks takes a space seperated list!
This commit is contained in:
parent
bab29cfe7f
commit
20f7a93170
@ -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
|
||||
|
@ -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.
|
||||
<channel> 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user