37 lines
639 B
Rust
37 lines
639 B
Rust
|
|
||
|
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,
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|