Ctcp: Fix 'RuntimeError: dictionary changed size during iteration'

This commit is contained in:
Valentin Lorentz 2022-08-06 15:09:10 +02:00
parent 0780624450
commit 4db32e24a5
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ class Ctcp(callbacks.PluginRegexp):
def callCommand(self, command, irc, msg, *args, **kwargs):
if conf.supybot.abuse.flood.ctcp():
now = time.time()
for (ignore, expiration) in self.ignores.items():
for (ignore, expiration) in list(self.ignores.items()):
if expiration < now:
del self.ignores[ignore]
elif ircutils.hostmaskPatternEqual(ignore, msg.prefix):