From 27d5c1aa61ac41b70a41fb7c6232d274ecab8794 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Thu, 19 Apr 2012 12:20:57 +0100 Subject: [PATCH] Right, sessionData isn't in the DB. --- modules/badwords.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/badwords.js b/modules/badwords.js index 5ed3615..48c3325 100644 --- a/modules/badwords.js +++ b/modules/badwords.js @@ -12,14 +12,14 @@ var badwords = function(dbot) { data.channel = '#42'; badWordLock = true; - dbot.db.sessionData.badwords.finished = false; + dbot.sessionData.badwords.finished = false; dbot.say('bots', 'badwords ' + data.channel + ' list'); dbot.instance.addListener('PRIVMSG', function(data) { if(data.channel === 'bots') { if(data.message.indexOf('bad words list is empty') != -1) { - dbot.db.sessionData.badwords.count = 0; - dbot.db.sessionData.badwords.finished = true; + dbot.sessionData.badwords.count = 0; + dbot.sessionData.badwords.finished = true; } else { var wordMatch = data.message.valMatch(/\w([1-10])\w(.*)/, 2); dbot.say('reality', wordMatch[1]); @@ -27,7 +27,7 @@ var badwords = function(dbot) { } }); - dbot.db.sessionData.badwords = {}; + dbot.sessionData.badwords = {}; badWordLock = false; } } @@ -35,8 +35,8 @@ var badwords = function(dbot) { return { 'onLoad': function() { - if(dbot.db.sessionData.hasOwnProperty('badwords')) { - dbot.db.sessionData.badwords = {}; + if(dbot.sessionData.hasOwnProperty('badwords')) { + dbot.sessionData.badwords = {}; } return commands;