mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +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):
|
||||
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()
|
||||
else:
|
||||
irc.error(_('There is no such alias.'))
|
||||
@ -317,7 +322,12 @@ class Alias(callbacks.Plugin):
|
||||
"""
|
||||
if name in self.aliases and self.isCommandMethod(name):
|
||||
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()
|
||||
else:
|
||||
irc.error(_('There is no such alias.'))
|
||||
|
Loading…
Reference in New Issue
Block a user