def handle_plugenable(bot, event): """ arguments" <plugname> - enable a plugin. """ if not event.rest: event.missing("<plugname>") ; return mod = bot.plugs.getmodule(event.rest) if not mod: event.reply("can't find module for %s" % event.rest) ; return event.reply("reloading and enabling %s" % mod) plugenable(mod) bot.enable(mod) bot.plugs.reload(mod, force=True) event.done()
def handle_plugenable(bot, event): """ arguments" <plugname> - enable a plugin. """ if not event.rest: event.missing("<plugname>") ; return if "." in event.rest: mod = event.rest else: mod = bot.plugs.getmodule(event.rest) if not mod: event.reply("can't find module for %s" % event.rest) ; return event.reply("reloading and enabling %s" % mod) plugenable(mod) bot.do_enable(mod) bot.plugs.reload(mod, force=True, showerror=True) update_mod(mod) event.done()
def handle_plugenable(bot, event): """ arguments" <plugname> - enable a plugin. """ if not event.rest: event.missing("<plugname>") return if "." in event.rest: mod = event.rest else: mod = bot.plugs.getmodule(event.rest) if not mod: event.reply("can't find module for %s" % event.rest) return event.reply("reloading and enabling %s" % mod) plugenable(mod) bot.do_enable(mod) bot.plugs.reload(mod, force=True, showerror=True) update_mod(mod) event.done()