From f8cfc04ab213ace4a72785e55c1b2e243e33629e Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 30 Nov 2014 03:56:25 +0000 Subject: [PATCH 1/5] Update words.js --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index 4604eee..4c8768f 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -65,7 +65,7 @@ var words = function(dbot) { if(!err && word) { this.wn.definitions(encodeURIComponent(word.word), function(err, defs) { if(!err && defs[0]) { - if(!String(defs[0]).match(/plural/i)) { + if(defs[0].text.match(/plural/i)) { event.reply(dbot.t('def', { 'word': word.word, 'definition': defs[0].text From ba0d99b60d76dec9421a779c634eb220b996a451 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 30 Nov 2014 03:57:41 +0000 Subject: [PATCH 2/5] Update words.js --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index 4c8768f..5969d6d 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -76,7 +76,7 @@ var words = function(dbot) { } else { event.reply(dbot.t('no_def', { 'word': query })); } - }); + }.bind(this)); } }.bind(this)); }, From 72afc1ca0a772857dafd60fb57dafcb2e1a78deb Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 30 Nov 2014 03:58:22 +0000 Subject: [PATCH 3/5] Update words.js --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index 5969d6d..f04fa22 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -71,7 +71,7 @@ var words = function(dbot) { 'definition': defs[0].text })); } else { - this.commands['rw'](event); + dbot.commands['rw'](event); } } else { event.reply(dbot.t('no_def', { 'word': query })); From 047ed35f83bf0dbacb2cd528561cdb5c5b0edadc Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 30 Nov 2014 03:59:19 +0000 Subject: [PATCH 4/5] Update words.js --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index f04fa22..a87a247 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -65,7 +65,7 @@ var words = function(dbot) { if(!err && word) { this.wn.definitions(encodeURIComponent(word.word), function(err, defs) { if(!err && defs[0]) { - if(defs[0].text.match(/plural/i)) { + if(!defs[0].text.match(/plural/i)) { event.reply(dbot.t('def', { 'word': word.word, 'definition': defs[0].text From d647b35405d1040d1d57f6c93eca639a1dd00292 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sun, 30 Nov 2014 04:01:14 +0000 Subject: [PATCH 5/5] Update words.js --- modules/words/words.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/words/words.js b/modules/words/words.js index a87a247..5a3c3b1 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -65,7 +65,7 @@ var words = function(dbot) { if(!err && word) { this.wn.definitions(encodeURIComponent(word.word), function(err, defs) { if(!err && defs[0]) { - if(!defs[0].text.match(/plural/i)) { + if(!defs[0].text.match(/plural/i) && !defs[0].text.match(/participle/i)) { event.reply(dbot.t('def', { 'word': word.word, 'definition': defs[0].text