diff --git a/chat-plugins/wifi.js b/chat-plugins/wifi.js index 7615f546f7..b944022197 100644 --- a/chat-plugins/wifi.js +++ b/chat-plugins/wifi.js @@ -1,7 +1,7 @@ /** * Wi-Fi chat-plugin. Only works in a room with id 'wifi' * Handles giveaways in the formats: question, lottery -* Credits: DanielCranham, codelegend +* Credits: Codelegend, SilverTactic, DanielCranham **/ // checks whether any alt of the user is present in list. @@ -16,7 +16,7 @@ function checkAllAlts(user, list) { return false; } -var giveaway = exports.giveaway = null; +var giveaway = null; var QuestionGiveAway = (function () { function QuestionGiveAway(host, giver, room, options) { @@ -64,9 +64,9 @@ var QuestionGiveAway = (function () { this.answered[userid]++; if (this.answered[userid] >= 3) { - output.sendReply("Your guess " + guess + " is wrong. You have used up all your guesses. Better luck next time."); + output.sendReply("Your guess " + guess + " is wrong. You have used up all your guesses. Better luck next time!"); } else { - output.sendReply("Your guess " + guess + " is wrong. Try again."); + output.sendReply("Your guess " + guess + " is wrong. Try again!"); } return; }; @@ -111,7 +111,7 @@ var QuestionGiveAway = (function () { this.phase = 'ended'; clearTimeout(this.endTimer); if (!this.winner) { - this.room.addRaw('The giveaway has been forcibly ended, as no one has answered the question'); + this.room.addRaw('The giveaway has been forcibly ended, as no one has answered the question. '); } else { var ans = []; for (var i in this.answers) { @@ -152,10 +152,10 @@ var LotteryGiveAway = (function () { this.reminder = '
It\'s giveaway time!
' + 'Giveaway started by ' + Tools.escapeHTML(host.name) + '

' + - '' + Tools.escapeHTML(giver.name) + ' will be giving away a ' + Tools.escapeHTML(this.prize) + '!
' + + '' + Tools.escapeHTML(giver.name) + ' will be giving away: ' + Tools.escapeHTML(this.prize) + '!
' + 'The lottery drawing will occur in 2 minutes, with ' + this.maxwinners + ' winners!
' + '
' + - 'Note: Please do not join if you don\'t have a 3DS and a copy of Pokemon XY or ORAS'; + 'Note: Please do not join if you don\'t have a 3DS and a copy of Pokémon XY or ORAS'; this.room.addRaw(this.reminder); this.room.update(); @@ -289,8 +289,9 @@ var commands = { for (var i in giveaway.answers) { answers.push(giveaway.answers[i]); } + var anstext = (answers.length === 1) ? 'answer is' : 'answers are'; this.sendReply("The giveaway question is " + giveaway.question + ".\n" + - "The answer(s) for the giveaway question are : " + answers.join('/') + "."); + "The " + anstext + answers.join('/') + "."); }, guessanswer: 'guess', guess: function (target, room, user) { @@ -402,7 +403,7 @@ var commands = { default: if (!this.canBroadcast()) return; reply = 'Wi-Fi room Giveaway help and info
' + - '- help giveaway - shows list of participation commands
' + + '- help user - shows list of participation commands
' + '- help staff - shows giveaway staff commands (Requires: % @ # & ~)'; } this.sendReplyBox(reply);