Factoids: Use supybot.plugins.Factoids.requireVoice for @forget too.

This commit is contained in:
Valentin Lorentz 2013-05-18 14:47:38 +02:00
parent 9e1cf727e3
commit 8bfea88e3f

View File

@ -649,6 +649,9 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
<channel> is only necessary if <channel> is only necessary if
the message isn't sent in the channel itself. the message isn't sent in the channel itself.
""" """
if self.registryValue('requireVoice', channel) and \
not irc.state.channels[channel].isVoicePlus(msg.nick):
irc.error(_('You have to be at least voiced to remove factoids.'))
number = None number = None
if len(words) > 1: if len(words) > 1:
if words[-1].isdigit(): if words[-1].isdigit():