diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js
index 1a998c5d9..b8879d190 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js
@@ -15,6 +15,12 @@ var ChatBoxUI = Class.extend({
this.div = div;
this.communication = new GempLotrCommunication(url, function(xhr, ajaxOptions, thrownError) {
if (thrownError != "abort") {
+ if (xhr != null) {
+ if (xhr.status == 401) {
+ that.appendMessage("Chat problem - You're not logged in, go to the main page to log in", "warningMessage");
+ return;
+ }
+ }
that.appendMessage("Chat had a problem communicating with the server, no new messages will be displayed, but your messages still might get sent.", "warningMessage");
that.appendMessage("Reload the browser page (press F5) to resume the chat.", "warningMessage");
}
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
index d9fb9b70c..78e75fdcb 100644
--- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
+++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/hallUi.js
@@ -13,6 +13,12 @@ var GempLotrHallUI = Class.extend({
this.div = div;
this.comm = new GempLotrCommunication(url, function(xhr, ajaxOptions, thrownError) {
if (thrownError != "abort") {
+ if (xhr != null) {
+ if (xhr.status == 401) {
+ chat.appendMessage("Game hall problem - You're not logged in, go to the main page to log in", "warningMessage");
+ return;
+ }
+ }
chat.appendMessage("The game hall had a problem communicating with the server, no new updates will be displayed.", "warningMessage");
chat.appendMessage("Reload the browser page (press F5) to resume the game hall functionality.", "warningMessage");
}