mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Owner: don't allow reloading the Owner plugin
This commit is contained in:
parent
e925069ae9
commit
7e26a7fe3f
@ -446,6 +446,9 @@ class Owner(callbacks.Plugin):
|
|||||||
Unloads and subsequently reloads the plugin by name; use the 'list'
|
Unloads and subsequently reloads the plugin by name; use the 'list'
|
||||||
command to see a list of the currently loaded plugins.
|
command to see a list of the currently loaded plugins.
|
||||||
"""
|
"""
|
||||||
|
if ircutils.strEqual(name, self.name()):
|
||||||
|
irc.error('You can\'t reload the %s plugin.' % name)
|
||||||
|
return
|
||||||
callbacks = irc.removeCallback(name)
|
callbacks = irc.removeCallback(name)
|
||||||
if callbacks:
|
if callbacks:
|
||||||
module = sys.modules[callbacks[0].__module__]
|
module = sys.modules[callbacks[0].__module__]
|
||||||
|
Loading…
Reference in New Issue
Block a user