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
1 changed files with 6 additions and 0 deletions

View File

@ -757,6 +757,12 @@ window.onload = function() {
}
$("#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) {
write("tab-main").cls();
userlist.clear();