mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Okay, total exorcism of the stupidity.
This commit is contained in:
parent
ebaecbf665
commit
6d5050eef8
@ -179,7 +179,7 @@ class Alias(callbacks.Privmsg):
|
|||||||
# with an Irc, we add our aliases and then delete ourselves :)
|
# with an Irc, we add our aliases and then delete ourselves :)
|
||||||
for (alias, (command, locked)) in self.aliases.iteritems():
|
for (alias, (command, locked)) in self.aliases.iteritems():
|
||||||
try:
|
try:
|
||||||
self.addAlias(irc, msg, alias, command, locked)
|
self.addAlias(irc, alias, command, locked)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.log.exception('Exception when trying to add alias %s. '
|
self.log.exception('Exception when trying to add alias %s. '
|
||||||
'Removing from the Alias database.' % alias)
|
'Removing from the Alias database.' % alias)
|
||||||
@ -218,7 +218,7 @@ class Alias(callbacks.Privmsg):
|
|||||||
unlock = privmsgs.checkCapability(unlock, 'admin')
|
unlock = privmsgs.checkCapability(unlock, 'admin')
|
||||||
|
|
||||||
_invalidCharsRe = re.compile(r'[\[\]\s]')
|
_invalidCharsRe = re.compile(r'[\[\]\s]')
|
||||||
def addAlias(self, irc, msg, name, alias, lock=False):
|
def addAlias(self, irc, name, alias, lock=False):
|
||||||
if self._invalidCharsRe.search(name):
|
if self._invalidCharsRe.search(name):
|
||||||
raise AliasError, 'Names cannot contain spaces or square brackets.'
|
raise AliasError, 'Names cannot contain spaces or square brackets.'
|
||||||
if '|' in name:
|
if '|' in name:
|
||||||
|
Loading…
Reference in New Issue
Block a user