if cbret is NotImplemented:
self.msg(user, "Command not implemented.")
continue
-
- self.msg(user, "No such command, or you don't have access.")
+ else:
+ self.msg(user, "No such command, or you don't have access.")
def msg(self, target, msg):
if isinstance(target, self.parent.User): self.conn.send("NOTICE %s :%s" % (target.nick, msg))
mod = __import__(modname)
reload(mod)
+ if not hasattr(mod, 'modinfo'):
+ return modlib.error('no modinfo')
+
if 1 not in mod.modinfo['compatible']:
return modlib.error('API-incompatible')
@lib.hook('modlist', needchan=False, glevel=lib.STAFF)
@lib.argsEQ(0)
def cmd_modlist(bot, user, chan, realtarget, *args):
- return NotImplemented
+ mods = ctlmod.modules
+ for mod in mods.itervalues():
+ bot.msg(user, "- %s %r" % (mod.__name__, mod))
+ bot.msg(user, "Done.")