(init) Identity Module

This commit is contained in:
ModulatingForce 2024-01-29 06:18:27 -05:00
commit 422cd93303
3 changed files with 50 additions and 2 deletions
src/core

36
src/core/identity.rs Normal file
View file

@ -0,0 +1,36 @@
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,
}
}
}