Hide ctcp messages
This commit is contained in:
parent
6763be43c0
commit
35f6f1a677
|
@ -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": {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue