Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed nickaname reassignment logic.

  • Loading branch information...
commit 526dc5be8602e4755d76daead459747d8f6c0933 1 parent 92a05d3
authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  public/js/app.js
6  public/js/app.js
@@ -230,8 +230,12 @@ $(document).ready(function() {
230 230
             message = message.replace(/(https?:\/\/[-_.a-zA-Z0-9&?\/=\[\]()$!#+:]+)/g, "<a href=\"$1\" target=\"_BLANK\">$1</a>");
231 231
             break;
232 232
         case "reconnecting":
  233
+            if (iReconnectPostpendCount == 0) {
  234
+                nickname = nickname + iReconnectPostpendCount;
  235
+            } else {
  236
+                nickname = nickname.substring(0, nickname.length-1) + (iReconnectPostpendCount % 10);
  237
+            }
233 238
             iReconnectPostpendCount++;
234  
-            nickname = nickname + iReconnectPostpendCount;
235 239
             message = '<span class="msg-disconnected">Reconnecting as ' + nickname + '...</span>';
236 240
             break;
237 241
         case "disconnected":

0 notes on commit 526dc5b

Please sign in to comment.
Something went wrong with that request. Please try again.