Reintroduce CMDFLAG_TEST

Add some more helpful messages for executing test/game commands.
This commit is contained in:
heinrich5991 2020-10-11 16:27:28 +02:00
parent 26a07c804f
commit a2b3f45f8b
7 changed files with 48 additions and 50 deletions

View file

@ -2650,13 +2650,6 @@ int CServer::Run()
return ErrorShutdown(); return ErrorShutdown();
} }
void CServer::ConRescue(CConsole::IResult *pResult, void *pUser)
{
char aBuf[128];
str_format(aBuf, sizeof(aBuf), "Value: %d", g_Config.m_SvRescue);
((CConsole *)pUser)->Print(CConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf);
}
void CServer::ConKick(IConsole::IResult *pResult, void *pUser) void CServer::ConKick(IConsole::IResult *pResult, void *pUser)
{ {
if(pResult->NumArguments() > 1) if(pResult->NumArguments() > 1)
@ -3524,8 +3517,6 @@ int main(int argc, const char **argv) // ignore_convention
if(argc > 1) // ignore_convention if(argc > 1) // ignore_convention
pConsole->ParseArguments(argc - 1, &argv[1]); // ignore_convention pConsole->ParseArguments(argc - 1, &argv[1]); // ignore_convention
pConsole->Register("sv_rescue", "", CFGFLAG_SERVER, CServer::ConRescue, pConsole, "Allow /rescue command so players can teleport themselves out of freeze (setting only works in initial config)");
pEngine->InitLogfile(); pEngine->InitLogfile();
// run the server // run the server

View file

@ -33,7 +33,7 @@ enum
CFGFLAG_ECON = 1 << 5, CFGFLAG_ECON = 1 << 5,
// DDRace // DDRace
CFGFLAG_NOMAPCFG = 1 << 6, CMDFLAG_TEST = 1 << 6,
CFGFLAG_CHAT = 1 << 7, CFGFLAG_CHAT = 1 << 7,
CFGFLAG_GAME = 1 << 8, CFGFLAG_GAME = 1 << 8,
CFGFLAG_NONTEEHISTORIC = 1 << 9, CFGFLAG_NONTEEHISTORIC = 1 << 9,

View file

@ -335,7 +335,7 @@ MACRO_CONFIG_INT(SvRankCheats, sv_rank_cheats, 0, 0, 1, CFGFLAG_SERVER, "Enable
MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as no one is on it anymore") MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_SERVER, "Shutdown server as soon as no one is on it anymore")
MACRO_CONFIG_INT(SvReloadWhenEmpty, sv_reload_when_empty, 0, 0, 2, CFGFLAG_SERVER, "Reload map when server is empty (1 = reload once, 2 = reload every time server gets empty)") MACRO_CONFIG_INT(SvReloadWhenEmpty, sv_reload_when_empty, 0, 0, 2, CFGFLAG_SERVER, "Reload map when server is empty (1 = reload once, 2 = reload every time server gets empty)")
MACRO_CONFIG_INT(SvKillProtection, sv_kill_protection, 20, 0, 9999, CFGFLAG_SERVER, "0 - Disable, 1-9999 minutes") MACRO_CONFIG_INT(SvKillProtection, sv_kill_protection, 20, 0, 9999, CFGFLAG_SERVER, "0 - Disable, 1-9999 minutes")
MACRO_CONFIG_INT(SvSoloServer, sv_solo_server, 0, 0, 1, CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_READONLY, "Set server to solo mode (no player interactions, has to be set before loading the map)") MACRO_CONFIG_INT(SvSoloServer, sv_solo_server, 0, 0, 1, CFGFLAG_SERVER | CFGFLAG_GAME, "Set server to solo mode (no player interactions, has to be set before loading the map)")
MACRO_CONFIG_STR(SvClientSuggestion, sv_client_suggestion, 128, "Get DDNet client from DDNet.tw to use all features on DDNet!", CFGFLAG_SERVER, "Broadcast to display to players without DDNet client") MACRO_CONFIG_STR(SvClientSuggestion, sv_client_suggestion, 128, "Get DDNet client from DDNet.tw to use all features on DDNet!", CFGFLAG_SERVER, "Broadcast to display to players without DDNet client")
MACRO_CONFIG_STR(SvClientSuggestionOld, sv_client_suggestion_old, 128, "Your DDNet client is old, update it on DDNet.tw!", CFGFLAG_SERVER, "Broadcast to display to players with an old version of DDNet client") MACRO_CONFIG_STR(SvClientSuggestionOld, sv_client_suggestion_old, 128, "Your DDNet client is old, update it on DDNet.tw!", CFGFLAG_SERVER, "Broadcast to display to players with an old version of DDNet client")
MACRO_CONFIG_STR(SvClientSuggestionBot, sv_client_suggestion_bot, 128, "Your client has bots and can be remotely controlled!\nPlease use another client like DDNet client from DDNet.tw", CFGFLAG_SERVER, "Broadcast to display to players with a known botting client") MACRO_CONFIG_STR(SvClientSuggestionBot, sv_client_suggestion_bot, 128, "Your client has bots and can be remotely controlled!\nPlease use another client like DDNet client from DDNet.tw", CFGFLAG_SERVER, "Broadcast to display to players with a known botting client")

View file

@ -430,7 +430,7 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo
if(pCommand) if(pCommand)
{ {
if(ClientID == IConsole::CLIENT_ID_GAME && (!(pCommand->m_Flags & CFGFLAG_GAME) || pCommand->m_Flags & CFGFLAG_NOMAPCFG)) if(ClientID == IConsole::CLIENT_ID_GAME && !(pCommand->m_Flags & CFGFLAG_GAME))
{ {
if(Stroke) if(Stroke)
{ {
@ -477,7 +477,7 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo
} }
else else
{ {
if(ClientID != IConsole::CLIENT_ID_GAME && pCommand->m_Flags & CFGFLAG_GAME) if(ClientID != IConsole::CLIENT_ID_GAME && (pCommand->m_Flags & CFGFLAG_GAME || pCommand->m_Flags & CMDFLAG_TEST))
{ {
if(g_Config.m_SvTestingCommands) if(g_Config.m_SvTestingCommands)
{ {
@ -486,7 +486,14 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo
else else
{ {
char aBuf[256]; char aBuf[256];
str_format(aBuf, sizeof(aBuf), "Command '%s' is forbidden. Test commands were disabled on the server.", Result.m_pCommand); if(pCommand->m_Flags & CFGFLAG_GAME)
{
str_format(aBuf, sizeof(aBuf), "Cannot execute game command '%s', put it into the map config or start the server with 'sv_test_cmds 1' to enable it", Result.m_pCommand);
}
else
{
str_format(aBuf, sizeof(aBuf), "Cannot execute testing command '%s', start the server with 'sv_test_cmds 1' to enable it", Result.m_pCommand);
}
Print(OUTPUT_LEVEL_STANDARD, "console", aBuf); Print(OUTPUT_LEVEL_STANDARD, "console", aBuf);
return; return;
} }
@ -742,7 +749,7 @@ static void IntVariableCommand(IConsole::IResult *pResult, void *pUserData)
{ {
if(pData->m_Readonly && pResult->m_ClientID >= 0) if(pData->m_Readonly && pResult->m_ClientID >= 0)
{ {
pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", "This is read only variable"); pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", "This is read-only variable");
return; return;
} }

View file

@ -7,35 +7,35 @@
#endif #endif
CONSOLE_COMMAND("kill_pl", "v[id]", CFGFLAG_SERVER, ConKillPlayer, this, "Kills player v and announces the kill") CONSOLE_COMMAND("kill_pl", "v[id]", CFGFLAG_SERVER, ConKillPlayer, this, "Kills player v and announces the kill")
CONSOLE_COMMAND("totele", "i[number]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConToTeleporter, this, "Teleports you to teleporter v") CONSOLE_COMMAND("totele", "i[number]", CFGFLAG_SERVER | CMDFLAG_TEST, ConToTeleporter, this, "Teleports you to teleporter v")
CONSOLE_COMMAND("totelecp", "i[number]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConToCheckTeleporter, this, "Teleports you to checkpoint teleporter v") CONSOLE_COMMAND("totelecp", "i[number]", CFGFLAG_SERVER | CMDFLAG_TEST, ConToCheckTeleporter, this, "Teleports you to checkpoint teleporter v")
CONSOLE_COMMAND("tele", "?i[id] ?i[id]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConTeleport, this, "Teleports player i (or you) to player i (or you to where you look at)") CONSOLE_COMMAND("tele", "?i[id] ?i[id]", CFGFLAG_SERVER | CMDFLAG_TEST, ConTeleport, this, "Teleports player i (or you) to player i (or you to where you look at)")
CONSOLE_COMMAND("addweapon", "i[weapon-id]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConAddWeapon, this, "Gives weapon with id i to you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)") CONSOLE_COMMAND("addweapon", "i[weapon-id]", CFGFLAG_SERVER | CMDFLAG_TEST, ConAddWeapon, this, "Gives weapon with id i to you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)")
CONSOLE_COMMAND("removeweapon", "i[weapon-id]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConRemoveWeapon, this, "removes weapon with id i from you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)") CONSOLE_COMMAND("removeweapon", "i[weapon-id]", CFGFLAG_SERVER | CMDFLAG_TEST, ConRemoveWeapon, this, "removes weapon with id i from you (all = -1, hammer = 0, gun = 1, shotgun = 2, grenade = 3, laser = 4, ninja = 5)")
CONSOLE_COMMAND("shotgun", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConShotgun, this, "Gives a shotgun to you") CONSOLE_COMMAND("shotgun", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConShotgun, this, "Gives a shotgun to you")
CONSOLE_COMMAND("grenade", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConGrenade, this, "Gives a grenade launcher to you") CONSOLE_COMMAND("grenade", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConGrenade, this, "Gives a grenade launcher to you")
CONSOLE_COMMAND("laser", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConLaser, this, "Gives a laser to you") CONSOLE_COMMAND("laser", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConLaser, this, "Gives a laser to you")
CONSOLE_COMMAND("rifle", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConLaser, this, "Gives a laser to you") CONSOLE_COMMAND("rifle", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConLaser, this, "Gives a laser to you")
CONSOLE_COMMAND("jetpack", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConJetpack, this, "Gives jetpack to you") CONSOLE_COMMAND("jetpack", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConJetpack, this, "Gives jetpack to you")
CONSOLE_COMMAND("weapons", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConWeapons, this, "Gives all weapons to you") CONSOLE_COMMAND("weapons", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConWeapons, this, "Gives all weapons to you")
CONSOLE_COMMAND("unshotgun", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnShotgun, this, "Removes the shotgun from you") CONSOLE_COMMAND("unshotgun", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnShotgun, this, "Removes the shotgun from you")
CONSOLE_COMMAND("ungrenade", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnGrenade, this, "Removes the grenade launcher from you") CONSOLE_COMMAND("ungrenade", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnGrenade, this, "Removes the grenade launcher from you")
CONSOLE_COMMAND("unlaser", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnLaser, this, "Removes the laser from you") CONSOLE_COMMAND("unlaser", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnLaser, this, "Removes the laser from you")
CONSOLE_COMMAND("unrifle", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnLaser, this, "Removes the laser from you") CONSOLE_COMMAND("unrifle", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnLaser, this, "Removes the laser from you")
CONSOLE_COMMAND("unjetpack", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnJetpack, this, "Removes the jetpack from you") CONSOLE_COMMAND("unjetpack", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnJetpack, this, "Removes the jetpack from you")
CONSOLE_COMMAND("unweapons", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnWeapons, this, "Removes all weapons from you") CONSOLE_COMMAND("unweapons", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnWeapons, this, "Removes all weapons from you")
CONSOLE_COMMAND("ninja", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConNinja, this, "Makes you a ninja") CONSOLE_COMMAND("ninja", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConNinja, this, "Makes you a ninja")
CONSOLE_COMMAND("super", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConSuper, this, "Makes you super") CONSOLE_COMMAND("super", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConSuper, this, "Makes you super")
CONSOLE_COMMAND("unsuper", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnSuper, this, "Removes super from you") CONSOLE_COMMAND("unsuper", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnSuper, this, "Removes super from you")
CONSOLE_COMMAND("unsolo", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnSolo, this, "Puts you out of solo part") CONSOLE_COMMAND("unsolo", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnSolo, this, "Puts you out of solo part")
CONSOLE_COMMAND("undeep", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnDeep, this, "Puts you out of deep freeze") CONSOLE_COMMAND("undeep", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnDeep, this, "Puts you out of deep freeze")
CONSOLE_COMMAND("left", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConGoLeft, this, "Makes you move 1 tile left") CONSOLE_COMMAND("left", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConGoLeft, this, "Makes you move 1 tile left")
CONSOLE_COMMAND("right", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConGoRight, this, "Makes you move 1 tile right") CONSOLE_COMMAND("right", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConGoRight, this, "Makes you move 1 tile right")
CONSOLE_COMMAND("up", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConGoUp, this, "Makes you move 1 tile up") CONSOLE_COMMAND("up", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConGoUp, this, "Makes you move 1 tile up")
CONSOLE_COMMAND("down", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConGoDown, this, "Makes you move 1 tile down") CONSOLE_COMMAND("down", "", CFGFLAG_SERVER | CMDFLAG_TEST, ConGoDown, this, "Makes you move 1 tile down")
CONSOLE_COMMAND("move", "i[x] i[y]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConMove, this, "Moves to the tile with x/y-number ii") CONSOLE_COMMAND("move", "i[x] i[y]", CFGFLAG_SERVER | CMDFLAG_TEST, ConMove, this, "Moves to the tile with x/y-number ii")
CONSOLE_COMMAND("move_raw", "i[x] i[y]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConMoveRaw, this, "Moves to the point with x/y-coordinates ii") CONSOLE_COMMAND("move_raw", "i[x] i[y]", CFGFLAG_SERVER | CMDFLAG_TEST, ConMoveRaw, this, "Moves to the point with x/y-coordinates ii")
CONSOLE_COMMAND("force_pause", "v[id] i[seconds]", CFGFLAG_SERVER, ConForcePause, this, "Force i to pause for i seconds") CONSOLE_COMMAND("force_pause", "v[id] i[seconds]", CFGFLAG_SERVER, ConForcePause, this, "Force i to pause for i seconds")
CONSOLE_COMMAND("force_unpause", "v[id]", CFGFLAG_SERVER, ConForcePause, this, "Set force-pause timer of i to 0.") CONSOLE_COMMAND("force_unpause", "v[id]", CFGFLAG_SERVER, ConForcePause, this, "Set force-pause timer of i to 0.")
@ -54,6 +54,6 @@ CONSOLE_COMMAND("moderate", "", CFGFLAG_SERVER, ConModerate, this, "Enables/disa
CONSOLE_COMMAND("vote_no", "", CFGFLAG_SERVER, ConVoteNo, this, "Same as \"vote no\"") CONSOLE_COMMAND("vote_no", "", CFGFLAG_SERVER, ConVoteNo, this, "Same as \"vote no\"")
CONSOLE_COMMAND("save_dry", "", CFGFLAG_SERVER, ConDrySave, this, "Dump the current savestring") CONSOLE_COMMAND("save_dry", "", CFGFLAG_SERVER, ConDrySave, this, "Dump the current savestring")
CONSOLE_COMMAND("freezehammer", "v[id]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConFreezeHammer, this, "Gives a player Freeze Hammer") CONSOLE_COMMAND("freezehammer", "v[id]", CFGFLAG_SERVER | CMDFLAG_TEST, ConFreezeHammer, this, "Gives a player Freeze Hammer")
CONSOLE_COMMAND("unfreezehammer", "v[id]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConUnFreezeHammer, this, "Removes Freeze Hammer from a player") CONSOLE_COMMAND("unfreezehammer", "v[id]", CFGFLAG_SERVER | CMDFLAG_TEST, ConUnFreezeHammer, this, "Removes Freeze Hammer from a player")
#undef CONSOLE_COMMAND #undef CONSOLE_COMMAND

View file

@ -2950,11 +2950,11 @@ void CGameContext::OnConsoleInit()
Console()->Register("tune", "s[tuning] i[value]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneParam, this, "Tune variable to value"); Console()->Register("tune", "s[tuning] i[value]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneParam, this, "Tune variable to value");
Console()->Register("toggle_tune", "s[tuning] i[value 1] i[value 2]", CFGFLAG_SERVER | CFGFLAG_GAME, ConToggleTuneParam, this, "Toggle tune variable"); Console()->Register("toggle_tune", "s[tuning] i[value 1] i[value 2]", CFGFLAG_SERVER | CFGFLAG_GAME, ConToggleTuneParam, this, "Toggle tune variable");
Console()->Register("tune_reset", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConTuneReset, this, "Reset tuning"); Console()->Register("tune_reset", "", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneReset, this, "Reset tuning");
Console()->Register("tune_dump", "", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConTuneDump, this, "Dump tuning"); Console()->Register("tune_dump", "", CFGFLAG_SERVER, ConTuneDump, this, "Dump tuning");
Console()->Register("tune_zone", "i[zone] s[tuning] i[value]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneZone, this, "Tune in zone a variable to value"); Console()->Register("tune_zone", "i[zone] s[tuning] i[value]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneZone, this, "Tune in zone a variable to value");
Console()->Register("tune_zone_dump", "i[zone]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConTuneDumpZone, this, "Dump zone tuning in zone x"); Console()->Register("tune_zone_dump", "i[zone]", CFGFLAG_SERVER, ConTuneDumpZone, this, "Dump zone tuning in zone x");
Console()->Register("tune_zone_reset", "?i[zone]", CFGFLAG_SERVER | CFGFLAG_GAME | CFGFLAG_NOMAPCFG, ConTuneResetZone, this, "reset zone tuning in zone x or in all zones"); Console()->Register("tune_zone_reset", "?i[zone]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneResetZone, this, "reset zone tuning in zone x or in all zones");
Console()->Register("tune_zone_leave", "i[zone] r[message]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneSetZoneMsgLeave, this, "which message to display on zone leave; use 0 for normal area"); Console()->Register("tune_zone_leave", "i[zone] r[message]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneSetZoneMsgLeave, this, "which message to display on zone leave; use 0 for normal area");
Console()->Register("tune_zone_enter", "i[zone] r[message]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneSetZoneMsgEnter, this, "which message to display on zone enter; use 0 for normal area"); Console()->Register("tune_zone_enter", "i[zone] r[message]", CFGFLAG_SERVER | CFGFLAG_GAME, ConTuneSetZoneMsgEnter, this, "which message to display on zone enter; use 0 for normal area");
Console()->Register("mapbug", "s[mapbug]", CFGFLAG_SERVER | CFGFLAG_GAME, ConMapbug, this, "Enable map compatibility mode using the specified bug (example: grenade-doublexplosion@ddnet.tw)"); Console()->Register("mapbug", "s[mapbug]", CFGFLAG_SERVER | CFGFLAG_GAME, ConMapbug, this, "Enable map compatibility mode using the specified bug (example: grenade-doublexplosion@ddnet.tw)");

View file

@ -173,7 +173,7 @@ MACRO_CONFIG_STR(SvServerType, sv_server_type, 64, "none", CFGFLAG_SERVER, "Type
MACRO_CONFIG_INT(SvSendVotesPerTick, sv_send_votes_per_tick, 5, 1, 15, CFGFLAG_SERVER, "Number of vote options being send per tick") MACRO_CONFIG_INT(SvSendVotesPerTick, sv_send_votes_per_tick, 5, 1, 15, CFGFLAG_SERVER, "Number of vote options being send per tick")
MACRO_CONFIG_INT(SvRescue, sv_rescue, 0, 0, 1, CFGFLAG_SERVER, "Allow /rescue command so players can teleport themselves out of freeze (setting only works in initial config)") MACRO_CONFIG_INT(SvRescue, sv_rescue, 0, 0, 1, CFGFLAG_SERVER | CFGFLAG_READONLY, "Allow /rescue command so players can teleport themselves out of freeze (setting only works in initial config)")
MACRO_CONFIG_INT(SvRescueDelay, sv_rescue_delay, 1, 0, 1000, CFGFLAG_SERVER, "Number of seconds between two rescues") MACRO_CONFIG_INT(SvRescueDelay, sv_rescue_delay, 1, 0, 1000, CFGFLAG_SERVER, "Number of seconds between two rescues")
MACRO_CONFIG_INT(SvPractice, sv_practice, 1, 0, 1, CFGFLAG_SERVER, "Enable practice mode for teams. Means you can use /rescue, but in turn your rank doesn't count.") MACRO_CONFIG_INT(SvPractice, sv_practice, 1, 0, 1, CFGFLAG_SERVER, "Enable practice mode for teams. Means you can use /rescue, but in turn your rank doesn't count.")