2019-06-21 09:35:05 +00:00
|
|
|
from src import EventManager, IRCLine, ModuleManager, utils
|
|
|
|
|
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("raw.send.privmsg", priority=EventManager.PRIORITY_MONITOR)
|
|
|
|
@utils.hook("raw.send.notice", priority=EventManager.PRIORITY_MONITOR)
|
|
|
|
def send_message(self, event):
|
2019-10-27 10:19:00 +00:00
|
|
|
our_hostmask = IRCLine.parse_hostmask(event["server"].hostmask())
|
2019-06-21 09:35:05 +00:00
|
|
|
|
2019-06-22 11:17:45 +00:00
|
|
|
echo = IRCLine.ParsedLine(event["line"].command, event["line"].args,
|
|
|
|
source=our_hostmask, tags=event["line"].tags)
|
2019-06-21 09:35:05 +00:00
|
|
|
echo.id = event["line"].id
|
|
|
|
|
|
|
|
self.events.on("raw.received").call(line=echo, server=event["server"])
|