2019-06-21 09:41:22 +00:00
|
|
|
from src import EventManager, ModuleManager, utils
|
|
|
|
|
2019-06-21 17:09:10 +00:00
|
|
|
CAP = utils.irc.Capability("echo-message", depends_on=["labeled-response"])
|
2019-06-21 09:41:22 +00:00
|
|
|
|
|
|
|
@utils.export("cap", CAP)
|
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("raw.send.privmsg", priority=EventManager.PRIORITY_LOW)
|
|
|
|
@utils.hook("raw.send.notice", priority=EventManager.PRIORITY_LOW)
|
|
|
|
def send_message(self, event):
|
|
|
|
if event["server"].has_capability(CAP):
|
|
|
|
event.eat()
|