This commit is contained in:
calzoneman 2013-09-04 17:47:24 -05:00
parent 5312911c15
commit 762b4fa6af
3 changed files with 9 additions and 1 deletions

View file

@ -624,6 +624,7 @@ Callbacks = {
/* REGION Chat */ /* REGION Chat */
usercount: function(count) { usercount: function(count) {
CHANNEL.usercount = count;
var text = count + " connected user"; var text = count + " connected user";
if(count != 1) { if(count != 1) {
text += "s"; text += "s";

View file

@ -31,7 +31,8 @@ var CHANNEL = {
js: "", js: "",
motd: "", motd: "",
motd_text: "", motd_text: "",
name: false name: false,
usercount: 0
}; };
var PLAYER = false; var PLAYER = false;

View file

@ -272,8 +272,10 @@ function calcUserBreakdown() {
"Moderators": 0, "Moderators": 0,
"Regular Users": 0, "Regular Users": 0,
"Guests": 0, "Guests": 0,
"Anonymous": 0,
"AFK": 0 "AFK": 0
}; };
var total = 0;
$("#userlist .userlist_item").each(function (index, item) { $("#userlist .userlist_item").each(function (index, item) {
var data = $(item).data("dropdown-info"); var data = $(item).data("dropdown-info");
if(data.rank >= 255) if(data.rank >= 255)
@ -287,10 +289,14 @@ function calcUserBreakdown() {
else else
breakdown["Guests"]++; breakdown["Guests"]++;
total++;
if($(item).find(".icon-time").length > 0) if($(item).find(".icon-time").length > 0)
breakdown["AFK"]++; breakdown["AFK"]++;
}); });
breakdown["Anonymous"] = CHANNEL.usercount - total;
return breakdown; return breakdown;
} }