support IRCLine.parse_human() in perform.py
This commit is contained in:
parent
747ba5c646
commit
b6a02d2476
1 changed files with 7 additions and 2 deletions
|
@ -1,12 +1,17 @@
|
||||||
#--depends-on commands
|
#--depends-on commands
|
||||||
#--depends-on permissions
|
#--depends-on permissions
|
||||||
|
|
||||||
from src import EventManager, ModuleManager, utils
|
from src import EventManager, IRCLine, ModuleManager, utils
|
||||||
|
|
||||||
class Module(ModuleManager.BaseModule):
|
class Module(ModuleManager.BaseModule):
|
||||||
def _execute(self, server, commands, **kwargs):
|
def _execute(self, server, commands, **kwargs):
|
||||||
for command in commands:
|
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)
|
@utils.hook("received.001", priority=EventManager.PRIORITY_URGENT)
|
||||||
def on_connect(self, event):
|
def on_connect(self, event):
|
||||||
|
|
Loading…
Reference in a new issue