mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Don't let dumb people unload Owner.
This commit is contained in:
parent
220d4b0889
commit
654ae4970a
@ -534,9 +534,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
"""<plugin>
|
"""<plugin>
|
||||||
|
|
||||||
Unloads the callback by name; use the 'list' command to see a list
|
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)
|
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)
|
callbacks = irc.removeCallback(name)
|
||||||
if callbacks:
|
if callbacks:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
|
Loading…
Reference in New Issue
Block a user