Alias: prevent "RuntimeError: dictionary changed size during iteration" for invalid aliases

This commit is contained in:
jacksonmj 2015-08-22 13:24:19 +00:00
parent f5c66afe4f
commit ff4040f479

View File

@ -272,7 +272,7 @@ class Alias(callbacks.Plugin):
command = value()
locked = value.locked()
self.aliases[unescapeAlias(name)] = [command, locked, None]
for (alias, (command, locked, _)) in self.aliases.items():
for (alias, (command, locked, _)) in self.aliases.copy().items():
try:
self.addAlias(irc, alias, command, locked)
except Exception as e: