summaryrefslogtreecommitdiff
path: root/abaddon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'abaddon.cpp')
-rw-r--r--abaddon.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/abaddon.cpp b/abaddon.cpp
index 2123dbd..93fce4c 100644
--- a/abaddon.cpp
+++ b/abaddon.cpp
@@ -240,6 +240,13 @@ void Abaddon::DiscordOnDisconnect(bool is_reconnecting, GatewayCloseCode close_c
m_main_window->UpdateComponents();
if (close_code == GatewayCloseCode::AuthenticationFailed) {
Gtk::MessageDialog dlg(*m_main_window, "Discord rejected your token", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ dlg.set_position(Gtk::WIN_POS_CENTER);
+ dlg.run();
+ } else if (close_code != GatewayCloseCode::Normal) {
+ Gtk::MessageDialog dlg(*m_main_window,
+ "Lost connection with Discord's gateway. Try reconnecting (code " + std::to_string(static_cast<unsigned>(close_code)) + ")",
+ false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ dlg.set_position(Gtk::WIN_POS_CENTER);
dlg.run();
}
}