lengthed chat buffer for mod channel to 1000
This commit is contained in:
parent
c99fda5da2
commit
cb8945b8ef
8 changed files with 136 additions and 16 deletions
|
|
@ -15,8 +15,8 @@ AnonymousCheck.prototype.onUserPreJoin = function (user, data, cb) {
|
|||
return cb("User disconnected", ChannelModule.DENY);
|
||||
}
|
||||
|
||||
//if(anonymousBanned && user.isAnonymous()) {
|
||||
if(anonymousBanned && user.account.globalRank <= 0) {
|
||||
if(anonymousBanned && user.isAnonymous()) {
|
||||
//if(anonymousBanned && user.account.globalRank <= 0) {
|
||||
user.socket.on("disconnect", function () {
|
||||
if (!user.is(Flags.U_IN_CHANNEL)) {
|
||||
cb("User disconnected", ChannelModule.DENY);
|
||||
|
|
|
|||
|
|
@ -437,8 +437,12 @@ ChatModule.prototype.sendMessage = function (msgobj) {
|
|||
this.channel.broadcastAll("chatMsg", msgobj);
|
||||
|
||||
this.dirty = true;
|
||||
this.buffer.push(msgobj);
|
||||
if (this.buffer.length > 15) {
|
||||
this.buffer.push(msgobj);//msg buffer push, trims it down to 15 messages
|
||||
if (this.channel.uniqueName === "mods"){
|
||||
if(this.buffer.length > 500){//make mods channel an exception :) Eventually this will be a setting per channel you can set from the web ui
|
||||
this.buffer.shift();
|
||||
}
|
||||
}else if (this.buffer.length > 15) {
|
||||
this.buffer.shift();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue