Added moduleof command.

This commit is contained in:
Jeremy Fincher 2003-04-14 05:54:33 +00:00
parent 2148a6e704
commit f94c1a2260

View File

@ -176,6 +176,18 @@ class MiscCommands(callbacks.Privmsg):
"""
irc.reply(msg, repr(conf.prefixChars))
def moduleof(self, irc, msg, args):
"""<command>
Returns the module <command> is in.
"""
command = privmsgs.getArgs(args)
method = irc.findCallback(command)
if method is not None:
irc.reply(msg, method.im_class.__name__)
else:
irc.error(msg, 'There is no such command %s' % command)
Class = MiscCommands