mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
[core] Add moderator badge to broadcasters
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d75a719781
commit
7dd2640f3b
1 changed files with 9 additions and 0 deletions
|
@ -60,6 +60,15 @@ func ParseBadgeLevels(m *irc.Message) BadgeCollection {
|
||||||
out.Add(BadgeSubscriber, out.Get(BadgeFounder))
|
out.Add(BadgeSubscriber, out.Get(BadgeFounder))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In order to simplify queries and permissions add an
|
||||||
|
// implicit moderator badge to broadcasters as they have
|
||||||
|
// the same (and more) permissions than a moderator. So
|
||||||
|
// when allowing actions for moderators now broadcasters
|
||||||
|
// ill also be included.
|
||||||
|
if out.Has(BadgeBroadcaster) && !out.Has(BadgeModerator) {
|
||||||
|
out.Add(BadgeModerator, 1)
|
||||||
|
}
|
||||||
|
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue