From 35f6f1a67759595e21f8ad78fe9c0d90c514e225 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Sat, 27 Sep 2014 08:46:32 -0700 Subject: [PATCH] Hide ctcp messages --- package.json | 2 +- src/plugins/irc-events/message.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 02bdc3c..56d419a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "shout", "description": "The self-hosted web IRC client", - "version": "0.37.2", + "version": "0.37.3", "author": "Mattias Erming", "preferGlobal": true, "bin": { diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js index eba6597..8bd4038 100644 --- a/src/plugins/irc-events/message.js +++ b/src/plugins/irc-events/message.js @@ -5,6 +5,11 @@ var Msg = require("../../models/msg"); module.exports = function(irc, network) { var client = this; irc.on("message", function(data) { + if (data.message.indexOf("\001") === 0) { + // Hide ctcp messages. + return; + } + var target = data.to; if (target.toLowerCase() == irc.me.toLowerCase()) { target = data.from;