summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2015-04-09 21:40:20 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2015-04-09 21:40:20 +0200
commitf8e811491c7413689896efdf452493d114644221 (patch)
tree4eac7b7b0d6fb8de829c1abe9818deaf2d9ec661
parent5e7a69c261ceae4a5857373c743db3e3b3dd6bff (diff)
downloadmanager-f8e811491c7413689896efdf452493d114644221.tar.gz
manager-f8e811491c7413689896efdf452493d114644221.zip
Added newscriptplayer command.
Restored additional help info, which was accidently removed with an update.
-rw-r--r--crsm.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/crsm.cpp b/crsm.cpp
index 7de9ea6..cd7c9c7 100644
--- a/crsm.cpp
+++ b/crsm.cpp
@@ -526,7 +526,14 @@ void CRSM::ircMessageReceived(IrcMessage *message)
{
if(settings["IrcUseIngameChat"] == "true" && !settings["IrcIngameChannel"].isEmpty())
{
- connection->sendCommand(IrcCommand::createTopic(settings["IrcIngameChannel"], "Kein laufendes Spiel."));
+ if(session["hosting"] != "true")
+ {
+ connection->sendCommand(IrcCommand::createTopic(settings["IrcIngameChannel"], "Kein laufendes Spiel."));
+ }
+ else
+ {
+ connection->sendCommand(IrcCommand::createTopic(settings["IrcIngameChannel"], "Aktuelles Szenario: " + session["scenname"] + " | Ingamechat ist " + (session["IrcUseIngameChat"] == "true" ? "" : "de") + "aktviert."));
+ }
}
}
}
@@ -1291,11 +1298,13 @@ UserType CRSM::clientUserType(const ClientInfo &client)
return Moderator;
if(sessionAdmin == client)
return Admin;
+ break;
case IRC:
if(ircMods.contains(client.nick))
return Moderator;
- if(ircAdmin == client)
+ else if(ircAdmin == client)
return Admin;
+ break;
case Management:
return Max;
case Auto: //just to avoid the compiler warning
@@ -1339,6 +1348,7 @@ void CRSM::setupCmds()
addCommand("asyncctrl", &CRSM::passToClonk, Clonk | IRC | Management, Admin, "Aktiviert den asynchronen Netzwerkmodus.");
addCommand("centralctrl", &CRSM::passToClonk, Clonk | IRC | Management, Admin, "Aktiviert den zentralen Netzwerkmodus.");
addCommand("decentralctrl", &CRSM::passToClonk, Clonk | IRC | Management, Admin, "Aktiviert den dezentralen Netzwerkmodus.");
+ addCommand("newscriptplayer", &CRSM::passToClonk, Clonk | IRC | Management, Admin, "Fügt in der Lobby einen Script spieler hinzu.", "[Spielername]");
addCommand("nodebug", &CRSM::passToClonk, Clonk | IRC | Management, Admin, "Deaktiviert den Debug-Modus zwingend für alle.");
addCommand("autohost", &CRSM::autohost, Clonk | IRC | Management, Moderator, "Deaktiviert den Debug-Modus zwingend für alle.");
addCommand("noautohost", &CRSM::autohost, Clonk | IRC | Management, Moderator, "Deaktiviert den Debug-Modus zwingend für alle.");
@@ -1508,7 +1518,9 @@ CMD_FUNCTION_IMPL(help)
if(!longHelp)
response = response.left(response.length() - 2);
respond(client, response + "\n");
- respond(client, "Genauere Informationen zu einem Befehl mit " CMD_SIGN "help <Befehlsname>\n");
+ respond(client, "Genauere Informationen zu einem Befehl mit " CMD_SIGN "help <Befehlsname>\n"
+ "[Sachen in eckigen Klammern sind optional]\n"
+ "<Sachen in spitzen Klammern sind benoetigte Argumente>\n");
}
else
{
@@ -1599,10 +1611,14 @@ CMD_FUNCTION_IMPL(host)
respond(client, "Szenario " + scen.name + " wurde der Warteschlange" + (scen.league ? " mit Liga" : "") + " hinzugefügt.\n");
if(userlist.length() == 1 && session["userwish"] != "true" && session["running"] != "true" && session["hosting"] == "true" && clients.size() > 0)
respond(client, "Überrede alle Spieler zu leaven und dein Wunsch wird sofort gehostet ;-)\n");
- else if(session["hosting"] != "true" && clients.size() == 0)
+ else if(session["hosting"] != "true")
{
nextScen();
}
+ else if(clients.size() == 0)
+ {
+ processManager->closeProgFifos();
+ }
}
else
{