Gracefully allow script authors time to update their code

This commit is contained in:
Xaekai 2017-06-15 22:09:09 -07:00
parent df0fc769d9
commit f89832a6d1
3 changed files with 20 additions and 17 deletions

View file

@ -418,8 +418,10 @@ Channel.prototype.acceptUser = function (user) {
user.socket.emit("channelNotRegistered");
}
user.on('afk', function(){
user.on('afk', function(afk){
self.sendUserMeta(self.users, user, -1);
// TODO: Drop legacy setAFK frame after a few months
self.broadcastAll("setAFK", { name: user.getName(), afk: afk });
})
};