@@ -582,6 +582,7 @@ public function taskExecute($name)
582582 {
583583 if ($ name == self ::SET_LIVE ) {
584584 $ this ->addLog ("Setting live. " );
585+ $ this ->pendingContinueMatch = false ;
585586 $ this ->enable = true ;
586587 } else if ($ name == self ::TASK_ENGAGE_MAP ) {
587588 $ tvTimeRemaining = $ this ->rcon ->send ("tv_time_remaining " );
@@ -718,7 +719,7 @@ private function isMatchRound()
718719 public function sendRotateMessage ()
719720 {
720721 // This is to send to players the status
721- if ($ this ->isMatchRound () && !$ this ->enable ) {
722+ if ($ this ->isMatchRound () && !$ this ->enable && ! $ this -> pendingContinueMatch ) {
722723 if (time () - $ this ->lastMessage >= 8 ) {
723724 $ this ->say ("Match is paused, write !continue to continue the match. " );
724725 $ teamA = strtoupper ($ this ->side ['team_a ' ]);
@@ -1755,7 +1756,7 @@ private function processRoundScored(\eBot\Message\Type\RoundScored $message)
17551756 }
17561757
17571758 $ data = $ this ->rcon ->send ("mp_backup_round_file_last " );
1758- if (preg_match ('!" mp_backup_round_file_last" = " (?<backup>[a-zA-Z0-9\-_\.]+)" ! ' , $ data , $ match )) {
1759+ if (preg_match ('!mp_backup_round_file_last = (?<backup>[a-zA-Z0-9\-_\.]+)! ' , $ data , $ match )) {
17591760 $ backupFile = "' " . $ match ["backup " ] . "' " ;
17601761 } else {
17611762 $ backupFile = 'NULL ' ;
@@ -2778,7 +2779,7 @@ private function continueMatch()
27782779 if ($ this ->continue ["ct " ] && $ this ->continue ["t " ]) {
27792780 $ this ->continue ["ct " ] = false ;
27802781 $ this ->continue ["t " ] = false ;
2781-
2782+ $ this -> pendingContinueMatch = true ;
27822783 $ this ->addMatchLog ("Getting back to the match. " );
27832784 $ this ->addLog ("Getting back to the match. " );
27842785
@@ -3369,9 +3370,12 @@ public function adminStopBack()
33693370 }
33703371 }
33713372
3373+ private $ pendingContinueMatch = false ;
3374+
33723375 public function adminGoBackRounds ($ round )
33733376 {
33743377 $ this ->enable = false ;
3378+ $ this ->pendingContinueMatch = true ;
33753379 $ sql = mysqli_query (Application::getInstance ()->db , "SELECT * FROM round_summary WHERE match_id = ' " . $ this ->match_id . "' AND map_id = ' " . $ this ->currentMap ->getMapId () . "' AND round_id = $ round " );
33763380 $ req = mysqli_fetch_array ($ sql );
33773381
0 commit comments