Hide ctcp messages

This commit is contained in:
Mattias Erming 2014-09-27 08:46:32 -07:00
parent 6763be43c0
commit 35f6f1a677
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "shout", "name": "shout",
"description": "The self-hosted web IRC client", "description": "The self-hosted web IRC client",
"version": "0.37.2", "version": "0.37.3",
"author": "Mattias Erming", "author": "Mattias Erming",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {

View File

@ -5,6 +5,11 @@ var Msg = require("../../models/msg");
module.exports = function(irc, network) { module.exports = function(irc, network) {
var client = this; var client = this;
irc.on("message", function(data) { irc.on("message", function(data) {
if (data.message.indexOf("\001") === 0) {
// Hide ctcp messages.
return;
}
var target = data.to; var target = data.to;
if (target.toLowerCase() == irc.me.toLowerCase()) { if (target.toLowerCase() == irc.me.toLowerCase()) {
target = data.from; target = data.from;