From 7f87c1e40a2f2e55d33287b988618910f7dae9a0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 28 Apr 2004 10:31:15 +0000 Subject: [PATCH] Fixed some bugz0rs. --- src/Owner.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Owner.py b/src/Owner.py index 1908ae3d8..dcad51198 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -128,6 +128,7 @@ def registerDefaultPlugin(command, plugin): command = callbacks.canonicalName(command) conf.registerGlobalValue(conf.supybot.commands.defaultPlugins, command, registry.String(plugin, '')) + conf.supybot.commands.defaultPlugins.get(command).setValue(plugin) registerDefaultPlugin('ignore', 'Admin') registerDefaultPlugin('unignore', 'Admin') @@ -399,7 +400,11 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): registerDefaultPlugin(command, plugin) irc.replySuccess() else: - irc.reply(conf.supybot.commands.defaultPlugins.get(command)()) + try: + irc.reply(conf.supybot.commands.defaultPlugins.get(command)()) + except registry.NonExistentRegistryEntry: + s = 'I don\'t have a default plugin set for that command.' + irc.error(s) def ircquote(self, irc, msg, args): """