From 33b9b8d1b0f8f10062483db068cd4a063cb22a6c Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 6 May 2013 18:12:25 +0000 Subject: [PATCH] poll web list works [#420] some commands using new users [#434] --- modules/poll/commands.js | 163 +++++++++++++++++++-------------------- modules/poll/pages.js | 15 ++-- views/poll/polllist.jade | 2 +- 3 files changed, 91 insertions(+), 89 deletions(-) diff --git a/modules/poll/commands.js b/modules/poll/commands.js index 1df1a6e..b643ebb 100644 --- a/modules/poll/commands.js +++ b/modules/poll/commands.js @@ -4,73 +4,73 @@ var _ = require('underscore')._, NoSuchThingError = databank.NoSuchThingError; var commands = function(dbot) { - var polls = dbot.db.polls; var commands = { '~newpoll': function(event) { var name = event.input[1].toLowerCase(), options = event.input[2].toLowerCase().split(','), description = event.input[3]; - - var votes = {}; - for(var i=0;i