mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-25 19:44:13 +01:00
Converted to use callbacks.findCallbackForCommand.
This commit is contained in:
parent
195dc208dd
commit
81345849d3
@ -132,7 +132,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
if not command:
|
if not command:
|
||||||
command = 'help'
|
command = 'help'
|
||||||
command = callbacks.canonicalName(command)
|
command = callbacks.canonicalName(command)
|
||||||
cb = irc.findCallback(command)
|
cb = callbacks.findCallbackForCommand(irc, command)
|
||||||
if cb:
|
if cb:
|
||||||
method = getattr(cb, command)
|
method = getattr(cb, command)
|
||||||
if hasattr(method, '__doc__') and method.__doc__ is not None:
|
if hasattr(method, '__doc__') and method.__doc__ is not None:
|
||||||
@ -171,7 +171,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
argument list given by the command 'syntax'.
|
argument list given by the command 'syntax'.
|
||||||
"""
|
"""
|
||||||
command = callbacks.canonicalName(privmsgs.getArgs(args))
|
command = callbacks.canonicalName(privmsgs.getArgs(args))
|
||||||
cb = irc.findCallback(command)
|
cb = callbacks.findCallbackForCommand(irc, command)
|
||||||
if cb:
|
if cb:
|
||||||
method = getattr(cb, command)
|
method = getattr(cb, command)
|
||||||
if hasattr(method, '__doc__') and method.__doc__ is not None:
|
if hasattr(method, '__doc__') and method.__doc__ is not None:
|
||||||
@ -252,7 +252,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
Returns the plugin <command> is in.
|
Returns the plugin <command> is in.
|
||||||
"""
|
"""
|
||||||
command = callbacks.canonicalName(privmsgs.getArgs(args))
|
command = callbacks.canonicalName(privmsgs.getArgs(args))
|
||||||
cb = irc.findCallback(command)
|
cb = callbacks.findCallbackForCommand(irc, command)
|
||||||
if cb is not None:
|
if cb is not None:
|
||||||
irc.reply(msg, cb.name())
|
irc.reply(msg, cb.name())
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user