diff options
Diffstat (limited to 'src/crsm.cpp')
| -rw-r--r-- | src/crsm.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp index 4506c4b..2e7f1a4 100644 --- a/src/crsm.cpp +++ b/src/crsm.cpp @@ -62,8 +62,11 @@ CRSM::CRSM(QObject *parent) : if(processManager->isRunning()) { + Session.read(SESSION_FILE_NAME, false); writeToServer("Server Manager läuft wieder.\nBis zur nächsten Runde könnte unerwartetes Verhalten auftreten.\n"); } + QFile sessionFile(SESSION_FILE_NAME); + if(sessionFile.exists()) sessionFile.remove(); setupCmds(); @@ -275,6 +278,11 @@ void CRSM::readServerOutput() { Session.CountDown = countDownExp.cap(1).toInt(); } + static QRegExp countDownExp2(R"(^(\d+)\.\.\.)"); + if(countDownExp2.exactMatch(what)) + { + Session.CountDown = countDownExp2.cap(1).toInt(); + } static QRegExp countDownStopExp("^(?:Spielstart abgebrochen\\.|Game start aborted\\.)"); if(countDownStopExp.exactMatch(what)) @@ -294,6 +302,7 @@ void CRSM::readInput() } Config.Auto.ProcessManager.ReattachId = processManager->ID(); writeConfig(); + Session.write(SESSION_FILE_NAME); QCoreApplication::quit(); return; } @@ -2042,6 +2051,7 @@ CMD_FUNCTION_IMPL(exit) CMD_FUNCTION_IMPL(exitDetach) Config.Auto.ProcessManager.ReattachId = processManager->ID(); writeConfig(); + Session.write(SESSION_FILE_NAME); QCoreApplication::quit(); } |
