Brackets were in the wrong place on the output statements. :|

This commit is contained in:
Luke Slater 2012-06-17 12:56:37 +01:00
parent b89f9e7065
commit 7fca2afcce

View File

@ -42,11 +42,11 @@ var poll = function(dbot) {
if(polls[name].owner === event.user) { if(polls[name].owner === event.user) {
if(!polls[name].votes.hasOwnProperty(name)) { if(!polls[name].votes.hasOwnProperty(name)) {
polls[name]['votes'][option] = 0; polls[name]['votes'][option] = 0;
event.reply(dbot.t('option_added'), {'user': event.user, event.reply(dbot.t('option_added', {'user': event.user,
'name': name, 'option': option}); 'name': name, 'option': option}));
} else { } else {
event.reply(dbot.t('option_exists'), {'option': option, event.reply(dbot.t('option_exists', {'option': option,
'name': name, 'user': event.user}); 'name': name, 'user': event.user}));
} }
} else { } else {
event.reply(dbot.t('not_poll_owner', {'user': event.user, event.reply(dbot.t('not_poll_owner', {'user': event.user,
@ -65,10 +65,10 @@ var poll = function(dbot) {
if(polls[name].owner === event.user) { if(polls[name].owner === event.user) {
if(polls[name].votes.hasOwnProperty(option)) { if(polls[name].votes.hasOwnProperty(option)) {
delete polls[name]['votes'][option]; delete polls[name]['votes'][option];
event.reply(dbot.t('option_removed'), {'user': event.user, event.reply(dbot.t('option_removed', {'user': event.user,
'name': name, 'option': option}); 'name': name, 'option': option}));
} else { } else {
event.reply(dbot.t('invalid_vote'), {'vote': option}); event.reply(dbot.t('invalid_vote', {'vote': option}));
} }
} else { } else {
event.reply(dbot.t('not_poll_owner', {'name': name})); event.reply(dbot.t('not_poll_owner', {'name': name}));