diff --git a/channel.js b/channel.js index 9aeb9d4a..72444dce 100644 --- a/channel.js +++ b/channel.js @@ -687,15 +687,19 @@ Channel.prototype.sendBanlist = function(user) { } } -Channel.prototype.sendRankStuff = function(user) { - this.sendBanlist(user); +Channel.prototype.sendChatFilters = function(user) { if(this.hasPermission(user, "filteredit")) { var filts = new Array(this.filters.length); for(var i = 0; i < this.filters.length; i++) { filts[i] = this.filters[i].pack(); } - user.socket.emit("chatFilters", {filters: filts}); + user.socket.emit("chatFilters", filts); } +} + +Channel.prototype.sendRankStuff = function(user) { + this.sendBanlist(user); + this.sendChatFilters(user); this.sendChannelRanks(user); } @@ -916,7 +920,7 @@ Channel.prototype.broadcastChatFilters = function() { } for(var i = 0; i < this.users.length; i++) { if(this.hasPermission(this.users[i], "filteredit")) { - this.users[i].socket.emit("chatFilters", {filters: filts}); + this.users[i].socket.emit("chatFilters", filts); } } } diff --git a/user.js b/user.js index ca03bb32..2dbcc6ab 100644 --- a/user.js +++ b/user.js @@ -391,6 +391,12 @@ User.prototype.initCallbacks = function() { } }.bind(this)); + this.socket.on("requestChatFilters", function() { + if(this.channel != null) { + this.channel.sendChatFilters(this); + } + }.bind(this)); + this.socket.on("requestChannelRanks", function() { if(this.channel != null) { if(this.noflood("requestChannelRanks", 0.25)) @@ -399,16 +405,6 @@ User.prototype.initCallbacks = function() { } }.bind(this)); - this.socket.on("requestSeenlogins", function() { - if(this.channel != null) { - if(this.noflood("requestSeenLogins", 0.25)) { - return; - } - // does nothing - this.channel.sendSeenLogins(this); - } - }.bind(this)); - this.socket.on("voteskip", function(data) { if(this.channel != null) { this.channel.tryVoteskip(this); diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index ff3c7311..264784a0 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -107,7 +107,13 @@ Callbacks = { }, chatFilters: function(entries) { - var tbl = $("#filtereditor table"); + var tbl = $("#filteredit table"); + if(!tbl.hasClass("table")) { + setTimeout(function() { + Callbacks.chatFilters(entries); + }, 100); + return; + } if(tbl.children().length > 1) { $(tbl.children()[1]).remove(); } @@ -116,7 +122,7 @@ Callbacks = { var tr = $("").appendTo(tbl); var remove = $("
-Filters Here + + + + + + + + + + + + +
DeleteNameRegexFlagsReplacementAffects LinksActive

Max 20KB. If you need more space, host the file externally and use the External CSS option