From 66554605e7926a9cac5da92d6387dd254db3aa07 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Thu, 14 Jun 2012 23:32:16 +0100 Subject: [PATCH] poll changed --- modules/poll.js | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/modules/poll.js b/modules/poll.js index 52beeab..31700ae 100644 --- a/modules/poll.js +++ b/modules/poll.js @@ -3,6 +3,9 @@ var poll = function(dbot) { var commands = { '~newpoll': function(event) { var name = event.input[1]; + var options = event.input[2].split(','); + var description = event.input[3]; + if(name === undefined || name === 'help') { event.reply(dbot.t('newpoll_usage')); } else { @@ -11,20 +14,40 @@ var poll = function(dbot) { } else { polls[name] = { 'name': name, + 'description': description, 'owner': event.user, - 'votes': {} + 'votes': {}, + 'votees': [] }; - var options = event.input[2].split(','); for(var i=0;i