mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Misc: further simplify custom help logic
This commit is contained in:
parent
f5bf5129a9
commit
9215bb5754
@ -209,7 +209,7 @@ class Misc(callbacks.Plugin):
|
|||||||
not ircdb.checkCapability(msg.prefix, 'owner'):
|
not ircdb.checkCapability(msg.prefix, 'owner'):
|
||||||
irc.errorNoCapability('owner')
|
irc.errorNoCapability('owner')
|
||||||
if unloaded and private:
|
if unloaded and private:
|
||||||
irc.error(_('--private and --unloaded are uncompatible options.'))
|
irc.error(_('--private and --unloaded are incompatible options.'))
|
||||||
return
|
return
|
||||||
if not cb:
|
if not cb:
|
||||||
if unloaded:
|
if unloaded:
|
||||||
@ -294,14 +294,9 @@ class Misc(callbacks.Plugin):
|
|||||||
cHelp = self.registryValue("customHelpString")
|
cHelp = self.registryValue("customHelpString")
|
||||||
if cHelp:
|
if cHelp:
|
||||||
irc.reply(cHelp)
|
irc.reply(cHelp)
|
||||||
return
|
else:
|
||||||
try:
|
irc.error()
|
||||||
renames = conf.supybot.commands.renames.get("Misc")()
|
return
|
||||||
if "help" in renames:
|
|
||||||
ourcmd = conf.supybot.commands.renames.get("Misc").get("help")()
|
|
||||||
except registry.NonExistentRegistryEntry:
|
|
||||||
ourcmd = "help"
|
|
||||||
command = ["misc", ourcmd]
|
|
||||||
command = list(map(callbacks.canonicalName, command))
|
command = list(map(callbacks.canonicalName, command))
|
||||||
(maxL, cbs) = irc.findCallbacksForArgs(command)
|
(maxL, cbs) = irc.findCallbacksForArgs(command)
|
||||||
if maxL == command:
|
if maxL == command:
|
||||||
|
Loading…
Reference in New Issue
Block a user