Fix #29: Correctly send sorted user list whenever an user joins

This commit is contained in:
Pavel Djundik 2016-02-14 11:50:48 +02:00
parent f87d605b53
commit b8dbbf8219

View file

@ -18,12 +18,11 @@ module.exports = function(irc, network) {
chan: chan
});
}
var users = chan.users;
users.push(new User({name: data.nick}));
chan.users.push(new User({name: data.nick}));
chan.sortUsers();
client.emit("users", {
chan: chan.id,
users: users
users: chan.users
});
var self = false;
if (data.nick.toLowerCase() === irc.me.toLowerCase()) {