Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't connect to servers to get username list

  • Loading branch information...
commit 54cc3112df5606af19020bd088d3132f2bfa4ae3 1 parent f35c0d9
ry ry authored

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 client.js
10 client.js
@@ -205,12 +205,16 @@ function onConnect (session) {
205 205 showChat(CONFIG.nick);
206 206 }
207 207
  208 +function outputNickString () {
  209 + var nick_string = nicks.length > 0 ? nicks.join(", ") : "(none)";
  210 + addMessage("users:", nick_string, new Date(), "notice");
  211 +}
  212 +
208 213 function who () {
209 214 jQuery.get("/who", {}, function (data, status) {
210 215 if (status != "success") return;
211 216 nicks = data.nicks;
212   - var nick_string = nicks.length > 0 ? nicks.join(", ") : "(none)";
213   - addMessage("users:", nick_string, new Date(), "notice");
  217 + outputNickString();
214 218 }, "json");
215 219 }
216 220
@@ -223,7 +227,7 @@ $(document).ready(function() {
223 227 $("#entry").attr("value", ""); // clear the entry field.
224 228 });
225 229
226   - $("#usersLink").click(who);
  230 + $("#usersLink").click(outputNickString);
227 231
228 232 $("#connectButton").click(function () {
229 233 showLoad();

0 comments on commit 54cc311

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