diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index f54da8e34..45cd536b1 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -310,6 +310,9 @@ MACRO_CONFIG_INT(SvShutdownWhenEmpty, sv_shutdown_when_empty, 0, 0, 1, CFGFLAG_S MACRO_CONFIG_INT(SvKillProtection, sv_kill_protection, 20, 0, 9999, CFGFLAG_SERVER, "0 - Disable, 1-9999 minutes") MACRO_CONFIG_INT(SvClientSuggestion, sv_client_suggestion, 1, 0, 1, CFGFLAG_SERVER, "Enable suggestion to use DDNet client when joining a server") +MACRO_CONFIG_STR(SvClientSuggestionOther, sv_client_suggestion_other, 128, "Get the 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 client version is old. Update it on ddnet.tw for new features!", CFGFLAG_SERVER, "Broadcast to display to players with an old version of DDNet client") + // netlimit MACRO_CONFIG_INT(SvNetlimit, sv_netlimit, 0, 0, 10000, CFGFLAG_SERVER, "Netlimit: Maximum amount of traffic a client is allowed to use (in kb/s)") MACRO_CONFIG_INT(SvNetlimitAlpha, sv_netlimit_alpha, 50, 1, 100, CFGFLAG_SERVER, "Netlimit: Alpha of Exponention moving average") diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 5cb942a5c..4acc90579 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -8,6 +8,7 @@ #include #include "gamecontext.h" #include +#include #include #include "gamemodes/DDRace.h" #include @@ -361,9 +362,9 @@ void CPlayer::OnPredictedInput(CNetObj_PlayerInput *NewInput) if(g_Config.m_SvClientSuggestion) { if(m_ClientVersion <= VERSION_DDNET_OLD) - GameServer()->SendBroadcast("Get the client from ddnet.tw to use all features on DDNet.", m_ClientID); + GameServer()->SendBroadcast(g_Config.m_SvClientSuggestionOther, m_ClientID); if(m_ClientVersion < CLIENT_VERSIONNR) - GameServer()->SendBroadcast("Your client version is old. Update it for new features!", m_ClientID); + GameServer()->SendBroadcast(g_Config.m_SvClientSuggestionOld, m_ClientID); m_FirstPacket = false; } }