Work on channel settings
This commit is contained in:
parent
8aa92f73ec
commit
24781df78f
8 changed files with 187 additions and 168 deletions
|
|
@ -954,7 +954,7 @@ Channel.prototype.sendChatFilters = function (users) {
|
|||
return;
|
||||
}
|
||||
|
||||
u.socket.emit("chatFilters", f);
|
||||
u.socket.emit("chatFilters", pkt);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -2751,7 +2751,9 @@ Channel.prototype.search = function (query, callback) {
|
|||
/**
|
||||
* Sends the result of readLog() to a user if the user has sufficient permission
|
||||
*/
|
||||
Channel.prototype.tryReadLog = function (user) {
|
||||
Channel.prototype.handleReadLog = function (user) {
|
||||
var self = this;
|
||||
|
||||
if (user.rank < 3) {
|
||||
user.kick("Attempted readChanLog with insufficient permission");
|
||||
return;
|
||||
|
|
@ -2766,7 +2768,7 @@ Channel.prototype.tryReadLog = function (user) {
|
|||
}
|
||||
|
||||
var filterIp = user.global_rank < 255;
|
||||
this.readLog(filterIp, function (err, data) {
|
||||
self.readLog(filterIp, function (err, data) {
|
||||
if (err) {
|
||||
user.socket.emit("readChanLog", {
|
||||
success: false,
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ User.prototype.initChannelCallbacks = function () {
|
|||
});
|
||||
|
||||
wrapTypecheck("setMotd", function (data) {
|
||||
self.channel.handleUpdateMotd(self, data);
|
||||
self.channel.handleSetMotd(self, data);
|
||||
});
|
||||
|
||||
wrapTypecheck("updateFilter", function (data) {
|
||||
|
|
@ -385,7 +385,7 @@ User.prototype.initChannelCallbacks = function () {
|
|||
self.channel.sendChannelRanks([self]);
|
||||
});
|
||||
|
||||
wrap("requestChatFilter", function () {
|
||||
wrap("requestChatFilters", function () {
|
||||
self.channel.sendChatFilters([self]);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue