From b6a02d2476f8ed88c9b5d354f24e34e5f00ceb81 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 27 Nov 2019 17:47:15 +0000 Subject: [PATCH] support IRCLine.parse_human() in perform.py --- modules/perform.py | 9 +++++++-- 1 file 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):