Add notification when a new tournament is created, you have available challenges or are challenged

This commit is contained in:
小太
2013-09-13 22:37:21 +10:00
parent c449f4ef73
commit 799d4c90ac

View File

@@ -124,7 +124,10 @@
switch (cmd) {
case 'create':
this.room.$chat.append("<div class=\"notice tournament-message-create\">A " + BattleFormats[data.shift()].name + " " + Tools.escapeHTML(data.join('|')) + " Tournament has been created.</div>");
var format = BattleFormats[data[0]].name;
var type = data[1];
this.room.$chat.append("<div class=\"notice tournament-message-create\">A " + format + " " + Tools.escapeHTML(type) + " Tournament has been created.</div>");
this.room.notifyOnce("Tournament created", "Room: " + this.room.title + "\nFormat: " + format + "\nType: " + type, 'tournament-create');
break;
case 'join':
@@ -188,7 +191,9 @@
this.$challengeTeam.children().data('type', 'challengeTeam');
this.$challengeTeam.children().attr('name', 'tournamentButton');
this.$challenge.addClass("active");
this.setBoxVisibility(true);
this.room.notifyOnce("Tournament challenges available", "Room: " + this.room.title, 'tournament-challenges');
break;
case 'challengebys':
@@ -210,7 +215,9 @@
this.$challengeTeam.children().data('type', 'challengeTeam');
this.$challengeTeam.children().attr('name', 'tournamentButton');
this.$challenged.addClass("active");
this.setBoxVisibility(true);
this.room.notifyOnce("Tournament challenge from " + data[0], "Room: " + this.room.title, 'tournament-challenged');
break;
case 'battlestart':