mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Merge pull request #1265 from GLolol/patch-1
Factoids: add missing Raise in requireVoice checks
This commit is contained in:
commit
fe52ba8fe8
@ -278,7 +278,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
def learn(self, irc, msg, args, channel, key, factoid):
|
def learn(self, irc, msg, args, channel, key, factoid):
|
||||||
if self.registryValue('requireVoice', channel) and \
|
if self.registryValue('requireVoice', channel) and \
|
||||||
not irc.state.channels[channel].isVoicePlus(msg.nick):
|
not irc.state.channels[channel].isVoicePlus(msg.nick):
|
||||||
irc.error(_('You have to be at least voiced to teach factoids.'))
|
irc.error(_('You have to be at least voiced to teach factoids.'), Raise=True)
|
||||||
|
|
||||||
# if neither key nor factoid exist, add them.
|
# if neither key nor factoid exist, add them.
|
||||||
# if key exists but factoid doesn't, add factoid, link it to existing key
|
# if key exists but factoid doesn't, add factoid, link it to existing key
|
||||||
@ -657,7 +657,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
"""
|
"""
|
||||||
if self.registryValue('requireVoice', channel) and \
|
if self.registryValue('requireVoice', channel) and \
|
||||||
not irc.state.channels[channel].isVoicePlus(msg.nick):
|
not irc.state.channels[channel].isVoicePlus(msg.nick):
|
||||||
irc.error(_('You have to be at least voiced to remove factoids.'))
|
irc.error(_('You have to be at least voiced to remove factoids.'), Raise=True)
|
||||||
number = None
|
number = None
|
||||||
if len(words) > 1:
|
if len(words) > 1:
|
||||||
if words[-1].isdigit():
|
if words[-1].isdigit():
|
||||||
|
Loading…
Reference in New Issue
Block a user