X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/fa93b93394adc45f4b3bd1694c960df127cfc4da..8e76c9bb472b80a69a5c7770c75afc53665508b4:/modules/msg.py diff --git a/modules/msg.py b/modules/msg.py index 5d1756a..d67382b 100644 --- a/modules/msg.py +++ b/modules/msg.py @@ -1,4 +1,5 @@ # Erebus IRC bot - Author: Erebus Team +# vim: fileencoding=utf-8 # This file is released into the public domain; see http://unlicense.org/ # module info @@ -19,10 +20,10 @@ modstop = lib.modstop # module code import time -@lib.hook(clevel=lib.OP) +@lib.hook(('say','cmsg'), clevel=lib.OP) @lib.help('', 'sends message to channel') @lib.argsGE(1) -def cmsg(bot, user, chan, realtarget, *args): +def say(bot, user, chan, realtarget, *args): chan.msg(' '.join(args)) @@ -30,7 +31,6 @@ def _getbot(bot, user, chan, realtarget, *args): target = None if args[0].startswith("#"): target = bot.parent.channel(args[0]) - if target is not None: sendbot = target.bot else: target = args[0]