mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 07:34:08 +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.
|
||||
"""
|
||||
if hasattr(self, name) and self.isCommandMethod(name):
|
||||
if name in self.aliases and self.isCommandMethod(name):
|
||||
self.aliases[name][1] = True
|
||||
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(True)
|
||||
irc.replySuccess()
|
||||
@ -232,7 +232,7 @@ class Alias(callbacks.Plugin):
|
||||
|
||||
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
|
||||
conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(False)
|
||||
irc.replySuccess()
|
||||
|
Loading…
Reference in New Issue
Block a user