Room State Management #44
|
@ -122,6 +122,9 @@ impl EventEmitter for DiceBot {
|
|||
let result = if event_affects_us && !adding_user {
|
||||
info!("Clearing all information for room ID {}", room_id);
|
||||
self.db.rooms.clear_info(room_id)
|
||||
} else if event_affects_us && adding_user {
|
||||
info!("Joined room {}; recording user information", room_id);
|
||||
Ok(())
|
||||
} else if !event_affects_us && adding_user {
|
||||
info!("Adding user {} to room ID {}", username, room_id);
|
||||
self.db.rooms.add_user_to_room(username, room_id)
|
||||
|
|
Loading…
Reference in New Issue