mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 08:40:01 +00:00
Fix: Subscriber matching did not include founders
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
a25b7530f2
commit
76924e10c1
1 changed files with 8 additions and 0 deletions
8
irc.go
8
irc.go
|
@ -225,5 +225,13 @@ func (ircHandler) ParseBadgeLevels(m *irc.Message) badgeCollection {
|
|||
out.Add(badgeParts[0], level)
|
||||
}
|
||||
|
||||
// If there is a founders badge but no subscribers badge
|
||||
// add a level-0 subscribers badge to prevent the bot to
|
||||
// cause trouble on founders when subscribers are allowed
|
||||
// to do something
|
||||
if out.Has(badgeFounder) && !out.Has(badgeSubscriber) {
|
||||
out.Add(badgeSubscriber, out.Get(badgeFounder))
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue