Don't let dumb people unload Owner.

This commit is contained in:
Jeremy Fincher 2004-08-01 18:46:56 +00:00
parent 220d4b0889
commit 654ae4970a
1 changed files with 5 additions and 1 deletions

View File

@ -534,9 +534,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
"""<plugin>
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: