mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-09 04:23:01 -05:00
Add messages for tournament autodq
This commit is contained in:
parent
cafaacdf2f
commit
4ba3050e95
|
|
@ -283,6 +283,18 @@
|
|||
this.room.$chat.append("<div class=\"notice tournament-message-disqualify\">" + Tools.escapeHTML(data[0]) + " has been disqualified from the tournament</div>");
|
||||
break;
|
||||
|
||||
case 'autodq':
|
||||
if (data[0] === 'off') {
|
||||
this.room.$chat.append("<div class=\"notice tournament-message-autodq-off\">The tournament's automatic disqualify timeout has been turned off</div>");
|
||||
} else if (data[0] === 'on') {
|
||||
this.room.$chat.append("<div class=\"notice tournament-message-autodq-off\">The tournament's automatic disqualify timeout has been set to " + (data[1] / 1000 / 60) + " minutes</div>");
|
||||
} else {
|
||||
var seconds = Math.floor(data[1] / 1000);
|
||||
app.addPopupMessage("Please respond to the tournament within " + seconds + " seconds or you may be automatically disqualified");
|
||||
this.room.notifyOnce("Tournament Automatic Disqualification Warning", "Room: " + this.room.title + "\nSeconds: " + seconds, 'tournament-autodq-warning');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'update':
|
||||
$.extend(this.updates, JSON.parse(data.join('|')));
|
||||
break;
|
||||
|
|
@ -461,6 +473,10 @@
|
|||
appendError("There aren't enough users.");
|
||||
break;
|
||||
|
||||
case 'InvalidAutoDisqualifyTimeout':
|
||||
appendError("That isn't a valid timeout value.");
|
||||
break;
|
||||
|
||||
case 'InvalidMatch':
|
||||
appendError("That isn't a valid tournament matchup.");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user