RSS: Fix announce removal to work with net+chan-specific config

It only removed the value from the chan-specific value.
This commit is contained in:
Valentin Lorentz 2020-10-10 11:49:15 +02:00
parent df6ebc78a0
commit 4bd5d8eb33
1 changed files with 11 additions and 4 deletions

View File

@ -527,10 +527,17 @@ class RSS(callbacks.Plugin):
message isn't sent in the channel itself.
"""
announce = conf.supybot.plugins.RSS.announce
S = announce.get(channel)()
for feed in feeds:
S.discard(feed)
announce.get(channel).setValue(S)
def remove_from_var(var):
S = var()
for feed in feeds:
S.discard(feed)
var.setValue(S)
remove_from_var(announce.get(channel))
remove_from_var(announce.getSpecific(
channel=channel, network=irc.network))
irc.replySuccess()
remove = wrap(remove, [('checkChannelCapability', 'op'),
many(first('url', 'feedName'))])