', {'class':'content'}).text(msg[2]).appendTo($msg);
+ $('
', {'class':'content'}).html(parseMessage(msg[2])).appendTo($msg);
}
$messages.scrollTop($messages[0].scrollHeight);
channel.lastDisplayed = i-1;
@@ -540,7 +574,11 @@ define([
network.sendto(peer, cryptMsg);
channel.updateStatus();
};
- chan.members.forEach(onJoining);
+ chan.members.forEach(function (peer) {
+ if (peer === Msg.hk) { return; }
+ if (channel.userList.indexOf(peer) !== -1) { return; }
+ channel.userList.push(peer);
+ });
chan.on('join', onJoining);
chan.on('leave', function (peer) {
var i = channel.userList.indexOf(peer);