diff options
Diffstat (limited to 'bot/src/commands')
| -rw-r--r-- | bot/src/commands/lua.cpp | 2 | ||||
| -rw-r--r-- | bot/src/commands/request.cpp | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp index 9e84f8e..0033cc5 100644 --- a/bot/src/commands/lua.cpp +++ b/bot/src/commands/lua.cpp @@ -1007,6 +1007,8 @@ namespace bot::command::lua { this->level = schemas::PermissionLevel::BROADCASTER; } else if (rights_text == "trusted") { this->level = schemas::PermissionLevel::TRUSTED; + } else if (rights_text == "superuser") { + this->level = schemas::PermissionLevel::SUPERUSER; } else { this->level = schemas::PermissionLevel::USER; } diff --git a/bot/src/commands/request.cpp b/bot/src/commands/request.cpp index 28638ef..da5d377 100644 --- a/bot/src/commands/request.cpp +++ b/bot/src/commands/request.cpp @@ -111,10 +111,15 @@ namespace bot::command { schemas::PermissionLevel level = schemas::PermissionLevel::USER; const auto &badges = irc_message.sender.badges; - if (std::any_of(cfg.twitch.trusted_user_ids.begin(), - cfg.twitch.trusted_user_ids.end(), [&user](const int &x) { - return x == user.get_alias_id(); - })) { + if (std::any_of( + cfg.twitch.superuser_ids.begin(), cfg.twitch.superuser_ids.end(), + [&user](const int &x) { return x == user.get_alias_id(); })) { + level = schemas::PermissionLevel::SUPERUSER; + } else if (std::any_of(cfg.twitch.trusted_user_ids.begin(), + cfg.twitch.trusted_user_ids.end(), + [&user](const int &x) { + return x == user.get_alias_id(); + })) { level = schemas::PermissionLevel::TRUSTED; } else if (user.get_alias_id() == channel.get_alias_id()) { level = schemas::PermissionLevel::BROADCASTER; |
