mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Alias: fix locking and unlocking for escaped aliases
This commit is contained in:
parent
a39238aba9
commit
711572b5b2
@ -303,7 +303,12 @@ class Alias(callbacks.Plugin):
|
|||||||
"""
|
"""
|
||||||
if name in self.aliases 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)
|
if (needsEscaping(name)):
|
||||||
|
group = conf.supybot.plugins.Alias.escapedaliases
|
||||||
|
name = escapeAlias(name)
|
||||||
|
else:
|
||||||
|
group = conf.supybot.plugins.Alias.aliases
|
||||||
|
group.get(name).locked.setValue(True)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
else:
|
else:
|
||||||
irc.error(_('There is no such alias.'))
|
irc.error(_('There is no such alias.'))
|
||||||
@ -317,7 +322,12 @@ class Alias(callbacks.Plugin):
|
|||||||
"""
|
"""
|
||||||
if name in self.aliases 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)
|
if (needsEscaping(name)):
|
||||||
|
group = conf.supybot.plugins.Alias.escapedaliases
|
||||||
|
name = escapeAlias(name)
|
||||||
|
else:
|
||||||
|
group = conf.supybot.plugins.Alias.aliases
|
||||||
|
group.get(name).locked.setValue(False)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
else:
|
else:
|
||||||
irc.error(_('There is no such alias.'))
|
irc.error(_('There is no such alias.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user