mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
plugins/Alias: Update Alias.lock and Alias.unlock to work now that aliases are no longer attributes of the plugin.
This commit is contained in:
parent
e15a5618b0
commit
afc78317c7
@ -219,7 +219,7 @@ class Alias(callbacks.Plugin):
|
|||||||
|
|
||||||
Locks an alias so that no one else can change it.
|
Locks an alias so that no one else can change it.
|
||||||
"""
|
"""
|
||||||
if hasattr(self, name) and self.isCommandMethod(name):
|
if name in self.aliases and self.isCommandMethod(name):
|
||||||
self.aliases[name][1] = True
|
self.aliases[name][1] = True
|
||||||
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(True)
|
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(True)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
@ -232,7 +232,7 @@ class Alias(callbacks.Plugin):
|
|||||||
|
|
||||||
Unlocks an alias so that people can define new aliases over it.
|
Unlocks an alias so that people can define new aliases over it.
|
||||||
"""
|
"""
|
||||||
if hasattr(self, name) and self.isCommandMethod(name):
|
if name in self.aliases and self.isCommandMethod(name):
|
||||||
self.aliases[name][1] = False
|
self.aliases[name][1] = False
|
||||||
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(False)
|
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(False)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
|
Loading…
Reference in New Issue
Block a user