summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2016-08-21 15:10:21 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2016-08-21 15:10:21 +0200
commit42b53fab03efcff917a357e72c44b7ebcd9b44d5 (patch)
tree1fd391d57af023c3d2b7cf9fd8fc823f376ddb75
parentf979fa62414641ee0fc2d5ae5e8bb08c8f05c7b0 (diff)
downloadmanager-42b53fab03efcff917a357e72c44b7ebcd9b44d5.tar.gz
manager-42b53fab03efcff917a357e72c44b7ebcd9b44d5.zip
Restructure hosting info text
-rw-r--r--src/crsm.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp
index 32a03d1..0fc391d 100644
--- a/src/crsm.cpp
+++ b/src/crsm.cpp
@@ -2435,11 +2435,16 @@ CMD_FUNCTION_IMPL(host)
{
ScenarioSettings scen(args, client);
QStringList argList = args.split(' ', QString::KeepEmptyParts);
+ QString ligaText = "";
if(argList.first().trimmed() == "--league")
{
argList.removeFirst();
scen.league = true;
scen.name = argList.join(' ');
+ if(!Config.Hosting.DisableLeague)
+ {
+ ligaText = " mit Liga";
+ }
}
if(!(scen.name = scenPath(scen.name)).isEmpty())
{
@@ -2448,7 +2453,12 @@ CMD_FUNCTION_IMPL(host)
userlist << scen;
Stats.AddScenarioWish(client, scenarioFileName(scen.name));
- respond(client, "Szenario " + scen.name + (scen.league ? " mit Liga" : "") + " " + (Session.State == CRSMSession::None || (Session.Clonk.Clients.size() == 0 && !Session.UserWish) ? "wird jetzt gehostet" : "wurde der Warteschlange hinzugefügt") + ".\n");
+ QString appendText = "";
+ if(scen.league && Config.Hosting.DisableLeague)
+ {
+ appendText = " (Liga wurde am Server deaktiviert)";
+ }
+ respond(client, "Szenario " + scen.name + " " + (Session.State == CRSMSession::None || (Session.Clonk.Clients.size() == 0 && !Session.UserWish) ? "wird jetzt" + ligaText + " gehostet" : "wurde der Warteschlange" + ligaText + " hinzugefügt") + "." + appendText + "\n");
if(userlist.length() == 1 && !Session.UserWish && Session.State == CRSMSession::Lobby && Session.Clonk.Clients.size() > 0)
respond(client, "Überrede alle Spieler zu leaven und dein Wunsch wird sofort gehostet ;-)\n");
else if(Session.State == CRSMSession::None)