mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-12 05:02:32 +01:00
RSS: Fix crashes when the set of channels changed while iterating.
This commit is contained in:
parent
ade5a02457
commit
c008d1191c
@ -386,7 +386,7 @@ class RSS(callbacks.Plugin):
|
|||||||
def update_feeds(self):
|
def update_feeds(self):
|
||||||
announced_feeds = {}
|
announced_feeds = {}
|
||||||
for irc in world.ircs:
|
for irc in world.ircs:
|
||||||
for channel in irc.state.channels:
|
for channel in list(irc.state.channels):
|
||||||
channel_feed_names = self.registryValue(
|
channel_feed_names = self.registryValue(
|
||||||
'announce', channel, irc.network)
|
'announce', channel, irc.network)
|
||||||
for name in channel_feed_names:
|
for name in channel_feed_names:
|
||||||
@ -421,7 +421,7 @@ class RSS(callbacks.Plugin):
|
|||||||
order = self.registryValue('sortFeedItems')
|
order = self.registryValue('sortFeedItems')
|
||||||
new_entries = sort_feed_items(new_entries, 'newestFirst')
|
new_entries = sort_feed_items(new_entries, 'newestFirst')
|
||||||
for irc in world.ircs:
|
for irc in world.ircs:
|
||||||
for channel in irc.state.channels:
|
for channel in list(irc.state.channels):
|
||||||
# Old bots have it set in plugins.RSS.announce.#channel,
|
# Old bots have it set in plugins.RSS.announce.#channel,
|
||||||
# new bots set it in plugins.RSS.announce.:network.#channel,
|
# new bots set it in plugins.RSS.announce.:network.#channel,
|
||||||
# so we want to read from both.
|
# so we want to read from both.
|
||||||
@ -623,7 +623,7 @@ class RSS(callbacks.Plugin):
|
|||||||
|
|
||||||
channels = []
|
channels = []
|
||||||
for ircnet in world.ircs:
|
for ircnet in world.ircs:
|
||||||
for channel in ircnet.state.channels:
|
for channel in list(ircnet.state.channels):
|
||||||
if feed in plugin.registryValue('announce', channel, ircnet.network):
|
if feed in plugin.registryValue('announce', channel, ircnet.network):
|
||||||
channels.append(ircnet.network + channel)
|
channels.append(ircnet.network + channel)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user