forcebot_rs/src/core/identity.rs

37 lines
639 B
Rust
Raw Normal View History

2024-01-29 06:18:27 -05:00
use std::collections::HashMap;
fn adminvector() -> Vec<String> {
vec![String::from("ModulatingForce")]
}
enum userRole {
Chatter,
Mod(String), // String specifies Channel
SupMod(String), // String specifies Channel
Broadcaster,
BotAdmin,
}
pub struct IdentityManager {
specialRolesUsers : HashMap<String,Vec<userRole>>,
}
impl IdentityManager {
pub fn init() -> IdentityManager {
let mut a = HashMap::new();
for admn in adminvector() {
a.insert(admn.to_lowercase(),vec![userRole::BotAdmin]);
};
IdentityManager {
specialRolesUsers : a,
}
}
}