diff --git a/src/models/chan.js b/src/models/chan.js index f52364f4..c0c5d0df 100644 --- a/src/models/chan.js +++ b/src/models/chan.js @@ -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) { diff --git a/src/models/msg.js b/src/models/msg.js index 2ea8193a..e4e82bce 100644 --- a/src/models/msg.js +++ b/src/models/msg.js @@ -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 = {