]> jfr.im git - erebus.git/blobdiff - modules/msg.py
trivia - alias !trivia to !start
[erebus.git] / modules / msg.py
index 1df017c97ef23979b61584af864062c24de04590..d67382ba6101721e6bc26a6a5bb5ceb3ba49e87f 100644 (file)
@@ -1,11 +1,12 @@
 # Erebus IRC bot - Author: Erebus Team
+# vim: fileencoding=utf-8
 # This file is released into the public domain; see http://unlicense.org/
 
 # module info
 modinfo = {
        'author': 'Erebus Team',
        'license': 'public domain',
-       'compatible': [1,2],
+       'compatible': [0],
        'depends': [],
        'softdeps': ['help'],
 }
@@ -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('<message>', '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]