From 654ae4970add56763c4d5803b7af46ee4326f8e2 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 1 Aug 2004 18:46:56 +0000 Subject: [PATCH] Don't let dumb people unload Owner. --- src/Owner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Owner.py b/src/Owner.py index cd9d44e42..0dd904e05 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -534,9 +534,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): """ Unloads the callback by name; use the 'list' command to see a list - of the currently loaded callbacks. + of the currently loaded callbacks. Obviously, the Owner plugin can't + be unloaded. """ name = privmsgs.getArgs(args) + if ircutils.strEqual(name, self.name()): + irc.error('You can\'t unload the %s plugin.' % self.name()) + return callbacks = irc.removeCallback(name) if callbacks: for callback in callbacks: