Encyclopedia: Improve exempting of commands in private.

This commit is contained in:
Krytarik Raido 2021-09-21 16:23:04 +02:00
parent f296c53534
commit 57cfd73750
2 changed files with 5 additions and 3 deletions

View File

@ -24,7 +24,7 @@ import supybot
import supybot.world as world
from importlib import reload
__version__ = "4.0.0"
__version__ = "4.1.0"
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@gmail.com")
__contributors__ = {
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Author'],

View File

@ -432,9 +432,11 @@ class Encyclopedia(callbacks.Plugin):
return
if not channel:
cmd = text.split()[0].lower()
args = text.lower().split(None, 2)
for c in irc.callbacks:
if c.isCommandMethod(cmd):
if (args[0] == c.name().lower() and len(args) > 1
and c.isCommandMethod(args[1])) \
or c.isCommandMethod(args[0]):
return
prefixchar = self.registryValue('prefixchar', channel)