aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-27 17:47:15 +0000
committerGravatar jesopo2019-11-27 17:47:15 +0000
commitb6a02d2476f8ed88c9b5d354f24e34e5f00ceb81 (patch)
tree73f37264936355265cf673daedd8875079764aff
parentadd IRCLine.parse_human() to allow for "!raw /msg jesopo hello" (diff)
signature
support IRCLine.parse_human() in perform.py
-rw-r--r--modules/perform.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/perform.py b/modules/perform.py
index 2c3b39f6..832cab54 100644
--- a/modules/perform.py
+++ b/modules/perform.py
@@ -1,12 +1,17 @@
#--depends-on commands
#--depends-on permissions
-from src import EventManager, ModuleManager, utils
+from src import EventManager, IRCLine, ModuleManager, utils
class Module(ModuleManager.BaseModule):
def _execute(self, server, commands, **kwargs):
for command in commands:
- server.send_raw(command.format(**kwargs))
+ line = command.format(**kwargs)
+ if IRCLine.is_human(line):
+ line = IRCLine.parse_human(line)
+ else:
+ line = IRCLine.parse_line(line)
+ server.send(line)
@utils.hook("received.001", priority=EventManager.PRIORITY_URGENT)
def on_connect(self, event):