]> jfr.im git - erebus.git/blobdiff - modules/help.py
revert apiversion to 0
[erebus.git] / modules / help.py
index 97dd1de0d1b3be8c9b04fecdb4d37c45fcf52ce4..dc4e1b287bf997816f78c4d8893768dc97f9ac2c 100644 (file)
@@ -6,7 +6,7 @@
 modinfo = {
        'author': 'Erebus Team',
        'license': 'public domain',
-       'compatible': [2],
+       'compatible': [0],
        'depends': [],
        'softdeps': [],
 }
@@ -16,7 +16,7 @@ import modlib
 lib = modlib.modlib(__name__)
 def modstart(parent, *args, **kwargs):
        if parent.cfg.getboolean('erebus', 'nofakelag'):
-               lib.hook(needchan=False)(lib.help('[@<module>|<command>]', 'lists commands or describes a command', 'with @<module>, lists all commands in <module>')(help_nolag))
+               lib.hook('help', needchan=False)(lib.help('[@<module>|<command>]', 'lists commands or describes a command', 'with @<module>, lists all commands in <module>')(help_nolag))
        else:
                lib.hook(needchan=False)(lib.help("<command>", "describes a command")(help))
        return lib.modstart(parent, *args, **kwargs)
@@ -156,7 +156,7 @@ def help(bot, user, chan, realtarget, *args):
 @lib.hook(needchan=False)
 @lib.help(None, "provides command list")
 def showcommands(bot, user, chan, realtarget, *args):
-       if bool(int(bot.parent.cfg.get('help', 'autogen', default=0))):
+       if bot.parent.cfg.getboolean('help', 'autogen'):
                try:
                        _genhelp(bot, user, chan, realtarget, *args)
                except: pass