diff options
| author | 2019-09-27 16:18:49 +0100 | |
|---|---|---|
| committer | 2019-09-27 16:18:49 +0100 | |
| commit | bc631119842bef5444160b099c99f6a9f0d664d1 (patch) | |
| tree | cfd98743b47878f639777ca1614e039d6c85a7ac /modules/echo.py | |
| parent | remove external_modules/ and replace with bot.conf and cli arg (diff) | |
| signature | ||
add !msg
Diffstat (limited to 'modules/echo.py')
| -rw-r--r-- | modules/echo.py | 9 |
1 files changed, 9 insertions, 0 deletions
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:])) |
