Make Encyclopedia enforce supybot.plugins.Encycopedia.enabled setting

This commit is contained in:
Terence Simpson 2014-06-02 02:24:20 +01:00
parent 9a29db902a
commit cc540f7c54

View File

@ -457,6 +457,9 @@ class Encyclopedia(callbacks.Plugin):
return
# Are we being queried?
recipient, text = msg.args
if not self.registryValue('enabled', ircutils.isChannel(recipient) and recipient or None):
# Encyclopedia is disabled here, do nothing
return
text = self.addressed(recipient, text, irc, msg)
if not text:
return