|
|
|
@ -20,16 +20,12 @@ class PlusPlugin(Plugin):
|
|
|
|
|
def __init__(self, bot):
|
|
|
|
|
super().__init__(bot)
|
|
|
|
|
self.handlers = {}
|
|
|
|
|
self.shortcut = self.config.get("shortcut")
|
|
|
|
|
|
|
|
|
|
def on_pubmsg(self, event):
|
|
|
|
|
if (
|
|
|
|
|
(self.shortcut and event.arguments[0].strip() == self.shortcut)
|
|
|
|
|
or self.should_handle_command(event.arguments[0], no_content=True)
|
|
|
|
|
):
|
|
|
|
|
self.process_handler(event)
|
|
|
|
|
return True
|
|
|
|
|
return False
|
|
|
|
|
if not self.should_handle_command(event.arguments[0], no_content=True):
|
|
|
|
|
return False
|
|
|
|
|
self.process_handler(event)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def process_handler(self, event):
|
|
|
|
|
if handler := self.handlers.pop(event.target, None):
|
|
|
|
|