diff --git a/exec/load/json-chat.js b/exec/load/json-chat.js index 07b675fd485a77e2af7963185cba38feabf8b242..bf0874731d09bd0535ddc85ad5f8001e3d8e7983 100644 --- a/exec/load/json-chat.js +++ b/exec/load/json-chat.js @@ -109,6 +109,11 @@ function JSONChat(usernum,jsonclient,host,port) { chan.users = users; if(this.userView) updateUserView(this.userView,chan); + var uList=[]; + for(var u in users) { + uList.push(users[u].nick); + } + chan.messages.push(new Message(undefined,"Users in " + chan.name + ": " + uList.join(", "),Date.now())); return users; } @@ -218,13 +223,7 @@ function JSONChat(usernum,jsonclient,host,port) { var cname = cmdstr.shift(); if(!cname) cname = target; - var users = this.who(cname); - var chan = this.channels[target.toUpperCase()]; - chan.messages.push(new Message(undefined,"users in " + cname + ":",Date.now())); - for(var u in users) { - this.channels[cname.toUpperCase()].users.push(users[u]); - chan.messages.push(new Message(undefined,"- " + users[u].nick,Date.now())); - } + this.who(cname); break; case "ME": cmdstr.shift();