Skip to content

Commit

Permalink
Merge pull request smogon#388 from sirDonovan/tourautostart
Browse files Browse the repository at this point in the history
Tournaments: add autostart messages
  • Loading branch information
Zarel committed May 23, 2015
2 parents 388a132 + 86e9997 commit d1ef184
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/client-chat-tournament.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@
this.room.notifyOnce("Tournament Automatic Disqualification Warning", "Room: " + this.room.title + "\nSeconds: " + seconds, 'tournament-autodq-warning');
}
break;

case 'autostart':
if (data[0] === 'off') {
this.room.$chat.append("<div class=\"notice tournament-message-autostart\">The tournament's automatic start timeout has been turned off.</div>");
} else if (data[0] === 'on') {
this.room.$chat.append("<div class=\"notice tournament-message-autostart\">The tournament will automatically start in " + (data[1] / 1000 / 60) + " minutes.</div>");
}
break;

case 'update':
$.extend(this.updates, JSON.parse(data.join('|')));
Expand Down Expand Up @@ -477,6 +485,7 @@
break;

case 'InvalidAutoDisqualifyTimeout':
case 'InvalidAutoStartTimeout':
appendError("That isn't a valid timeout value.");
break;

Expand Down

0 comments on commit d1ef184

Please sign in to comment.