From bb37adc63d7283da615de04e6144307d91660434 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 17 Oct 2013 04:48:45 +0000 Subject: [PATCH] allow curse incrusions --- modules/sstats/sstats.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/sstats/sstats.js b/modules/sstats/sstats.js index 7aa7771..eecaccf 100644 --- a/modules/sstats/sstats.js +++ b/modules/sstats/sstats.js @@ -23,7 +23,9 @@ var sstats = function(dbot) { curses = 0; _.each(words, function(word) { if(this.isUpperCase(word)) capitals++; - if(_.include(this.config.curses, word.toLowerCase())) curses++; + if(_.any(this.config.curses, function(curse) { return word.toLowerCase().indexOf(curse) != -1; })) { + curses++; + } }, this); event.uStats.words += wCount;