client: automatically reconnect with same username if we lose connection to the server

This commit is contained in:
mappu 2017-02-05 17:17:51 +13:00
parent c19b0fe521
commit e15a6afceb

View File

@ -757,6 +757,12 @@ window.onload = function() {
} }
$("#chatbox").value = pre_login; $("#chatbox").value = pre_login;
if (have_cleared_once) {
// re-log-in automatically
write("tab-main").system("Automatically reconnecting as \"" + pre_login + "\"...");
submit();
}
if (!have_cleared_once) { if (!have_cleared_once) {
write("tab-main").cls(); write("tab-main").cls();
userlist.clear(); userlist.clear();