From 3be9029669ac58b7b05ae618831b2101e13c18be Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 26 Sep 2019 12:27:20 +0100 Subject: [PATCH] add !action to echo.py --- modules/echo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/echo.py b/modules/echo.py index e2a43089..087f6413 100644 --- a/modules/echo.py +++ b/modules/echo.py @@ -7,3 +7,9 @@ class Module(ModuleManager.BaseModule): @utils.kwarg("min_args", 1) def echo(self, event): event["stdout"].write(event["args"]) + + @utils.hook("received.command.action") + @utils.kwarg("min_args", 1) + @utils.kwarg("expect_output", False) + def action(self, event): + event["target"].send_message("\x01ACTION %s\x01" % event["args"])