Define which message types should not be logged
This commit is contained in:
parent
93265ef830
commit
1fdd1ff0c3
@ -174,6 +174,10 @@ Chan.prototype.getFilteredClone = function(lastActiveChannel, lastMessage) {
|
||||
};
|
||||
|
||||
function writeUserLog(client, msg) {
|
||||
if (!msg.isLoggable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const target = client.find(this.id);
|
||||
|
||||
if (!target) {
|
||||
|
@ -37,6 +37,12 @@ class Msg {
|
||||
findPreview(link) {
|
||||
return this.previews.find((preview) => preview.link === link);
|
||||
}
|
||||
|
||||
isLoggable() {
|
||||
return this.type !== Msg.Type.MOTD &&
|
||||
this.type !== Msg.Type.BANLIST &&
|
||||
this.type !== Msg.Type.WHOIS;
|
||||
}
|
||||
}
|
||||
|
||||
Msg.Type = {
|
||||
|
Loading…
Reference in New Issue
Block a user