X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/3569ead38c546c3ecf47754b2c79d632d694a6ac..6e8f06d6fd26b75f2ef1b5ee1febc323bb4a6204:/modules/help.py?ds=inline diff --git a/modules/help.py b/modules/help.py index 97dd1de..94c28ee 100644 --- a/modules/help.py +++ b/modules/help.py @@ -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('[@|]', 'lists commands or describes a command', 'with @, lists all commands in ')(help_nolag)) + lib.hook('help', needchan=False)(lib.help('[@|]', 'lists commands or describes a command', 'with @, lists all commands in ')(help_nolag)) else: lib.hook(needchan=False)(lib.help("", "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 @@ -197,7 +197,7 @@ def help_nolag(bot, user, chan, realtarget, *args): cmd = str(' '.join(args)).lower() if cmd in cmds and user.glevel >= cmds[cmd].reqglevel: func = cmds[cmd] - bot.slowmsg(user, str(HelpLine(func.cmd[0], func.syntax, func.shorthelp, (user.glevel > 0), func.reqglevel, func.module))) + bot.slowmsg(user, str(HelpLine(func.cmd[0], func.syntax, func.shorthelp, (user.glevel > 0), func.reqglevel, func.module, func.reqclevel))) for line in func.longhelps: bot.slowmsg(user, " %s" % (line)) bot.slowmsg(user, "End of help for %s." % (func.cmd[0]))