From bc631119842bef5444160b099c99f6a9f0d664d1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 27 Sep 2019 16:18:49 +0100 Subject: [PATCH] add !msg --- modules/echo.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/echo.py b/modules/echo.py index 087f6413..ee27cc2b 100644 --- a/modules/echo.py +++ b/modules/echo.py @@ -13,3 +13,12 @@ class Module(ModuleManager.BaseModule): @utils.kwarg("expect_output", False) def action(self, event): event["target"].send_message("\x01ACTION %s\x01" % event["args"]) + + @utils.hook("received.command.msg") + @utils.kwarg("min_args", 2) + @utils.kwarg("permission", "say") + @utils.kwarg("remove_empty", False) + @utils.kwarg("help", "Send a message to a target") + def msg(self, event): + event["server"].send_message(event["args_split"][0], + " ".join(event["args_split"][1:]))