Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't connect to servers to get username list

  • Loading branch information...
commit 54cc3112df5606af19020bd088d3132f2bfa4ae3 1 parent f35c0d9
@ry ry authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 client.js
View
10 client.js
@@ -205,12 +205,16 @@ function onConnect (session) {
showChat(CONFIG.nick);
}
+function outputNickString () {
+ var nick_string = nicks.length > 0 ? nicks.join(", ") : "(none)";
+ addMessage("users:", nick_string, new Date(), "notice");
+}
+
function who () {
jQuery.get("/who", {}, function (data, status) {
if (status != "success") return;
nicks = data.nicks;
- var nick_string = nicks.length > 0 ? nicks.join(", ") : "(none)";
- addMessage("users:", nick_string, new Date(), "notice");
+ outputNickString();
}, "json");
}
@@ -223,7 +227,7 @@ $(document).ready(function() {
$("#entry").attr("value", ""); // clear the entry field.
});
- $("#usersLink").click(who);
+ $("#usersLink").click(outputNickString);
$("#connectButton").click(function () {
showLoad();
Please sign in to comment.
Something went wrong with that request. Please try again.