From 20e00af18de59638dde53aedbbbd9db05ff14a65 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sun, 16 Feb 2014 21:40:26 -0600 Subject: [PATCH] Fix filter leak --- lib/channel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/channel.js b/lib/channel.js index 0c5b9bd3..503eb1ab 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -104,7 +104,11 @@ function Channel(name) { motd: "", // Raw MOTD text html: "" // Filtered MOTD text (XSS removed; \n replaced by
) }; - self.filters = DEFAULT_FILTERS; + self.filters = []; + DEFAULT_FILTERS.forEach(function (f) { + var filt = new Filter(f.name, f.source, f.flags, f.replace); + self.updateFilter(filt); + }); self.emotes = []; self.logger = new Logger.Logger(path.join(__dirname, "../chanlogs", self.uniqueName + ".log"));