Replace bad regex with a substring test

This commit is contained in:
David White 2014-10-02 15:46:51 +01:00
parent 58709d021d
commit 58af356843
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ var Msg = require("../../models/msg");
module.exports = function(irc, network) {
var client = this;
irc.on("message", function(data) {
if (data.message.indexOf("\u0001") === 0 && !data.message.match(/\u0001ACTION.*\u001/)) {
if (data.message.indexOf("\u0001") === 0 && data.message.substring(0, 7) != "\u0001ACTION") {
// Hide ctcp messages.
return;
}