From e15a6afceb5e5da4a17e965cc474dec9706695db Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 5 Feb 2017 17:17:51 +1300 Subject: [PATCH] client: automatically reconnect with same username if we lose connection to the server --- client/dcwebui.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/dcwebui.js b/client/dcwebui.js index efa8c04..2bd2115 100644 --- a/client/dcwebui.js +++ b/client/dcwebui.js @@ -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();