plus: remove shortcut option
This commit is contained in:
parent
7f2fa0817e
commit
37a75f051d
|
@ -155,8 +155,7 @@
|
|||
"commands": ["plus"],
|
||||
"aliases": {
|
||||
"plus": "more"
|
||||
},
|
||||
"shortcut": "+"
|
||||
}
|
||||
},
|
||||
"randomchoice": {
|
||||
"commands": ["choose"],
|
||||
|
|
|
@ -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)
|
||||
):
|
||||
if not self.should_handle_command(event.arguments[0], no_content=True):
|
||||
return False
|
||||
self.process_handler(event)
|
||||
return True
|
||||
return False
|
||||
|
||||
def process_handler(self, event):
|
||||
if handler := self.handlers.pop(event.target, None):
|
||||
|
|
Loading…
Reference in a new issue