diff --git a/src/bot/instance.rs b/src/bot/instance.rs index 3515c87..c38c4d5 100644 --- a/src/bot/instance.rs +++ b/src/bot/instance.rs @@ -8,7 +8,7 @@ use std::sync::{Arc, Mutex}; use std::time::Duration; use cookie::{Cookie, CookieJar}; -use log::{debug, warn}; +use log::{debug, info, warn}; use tokio::select; use tokio::sync::{mpsc, oneshot}; use tokio_tungstenite::tungstenite; @@ -440,6 +440,13 @@ impl Instance { break; } } + Ok(Data::DisconnectEvent(ev)) => { + if ev.reason == "authentication changed" { + info!("{}: Disconnected because {}", config.name, ev.reason); + } else { + warn!("{}: Disconnected because {}", config.name, ev.reason); + } + } _ => {} }