From 17bbccbe98ac6cc4741e46ce8c939b956fe300d8 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Fri, 22 Jun 2012 19:27:59 +0100 Subject: [PATCH] move poll whatsit --- modules/poll.js | 4 ---- run.js | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/poll.js b/modules/poll.js index cebb735..a1081b8 100644 --- a/modules/poll.js +++ b/modules/poll.js @@ -1,8 +1,4 @@ var poll = function(dbot) { - if(!dbot.db.hasOwnProperty('polls')) { - dbot.db.polls = {}; - } - var polls = dbot.db.polls; var commands = { '~newpoll': function(event) { diff --git a/run.js b/run.js index e6505a5..8958783 100644 --- a/run.js +++ b/run.js @@ -42,6 +42,9 @@ var DBot = function(timers) { if(!this.db.hasOwnProperty("ignores")) { this.db.ignores = {}; } + if(!this.db.hasOwnProperty('polls')) { + this.db.polls = {}; + } // Load Strings file this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8'));