parent
00a65a1584
commit
df0fc769d9
|
@ -417,6 +417,10 @@ Channel.prototype.acceptUser = function (user) {
|
||||||
if (!this.is(Flags.C_REGISTERED)) {
|
if (!this.is(Flags.C_REGISTERED)) {
|
||||||
user.socket.emit("channelNotRegistered");
|
user.socket.emit("channelNotRegistered");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user.on('afk', function(){
|
||||||
|
self.sendUserMeta(self.users, user, -1);
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
Channel.prototype.partUser = function (user) {
|
Channel.prototype.partUser = function (user) {
|
||||||
|
|
|
@ -226,10 +226,7 @@ User.prototype.setAFK = function (afk) {
|
||||||
this.channel.modules.voteskip.update();
|
this.channel.modules.voteskip.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.channel.broadcastAll("setAFK", {
|
this.emit('afk', afk);
|
||||||
name: this.getName(),
|
|
||||||
afk: afk
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Automatically tag a user as AFK after a period of inactivity */
|
/* Automatically tag a user as AFK after a period of inactivity */
|
||||||
|
@ -424,7 +421,7 @@ User.prototype.getFirstSeenTime = function getFirstSeenTime() {
|
||||||
return this.socket.ipSessionFirstSeen.getTime();
|
return this.socket.ipSessionFirstSeen.getTime();
|
||||||
} else {
|
} else {
|
||||||
LOGGER.error(`User "${this.getName()}" (IP: ${this.realip}) has neither ` +
|
LOGGER.error(`User "${this.getName()}" (IP: ${this.realip}) has neither ` +
|
||||||
"an IP sesion first seen time nor a registered account.");
|
"an IP session first seen time nor a registered account.");
|
||||||
return Date.now();
|
return Date.now();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue