Skip to content

Commit

Permalink
sv_init: add the “contact” cvar and server info string to contain con…
Browse files Browse the repository at this point in the history
…tact information to reach out the server admin when needed
  • Loading branch information
illwieckz committed Jan 8, 2025
1 parent 4e1fdbd commit 70d9586
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/engine/server/sv_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ static Cvar::Cvar<std::string> cvar_pakname(
"pakname", "pak containing current map", Cvar::SERVERINFO | Cvar::ROM, "");
static Cvar::Cvar<std::string> sv_paks(
"sv_paks", "currently loaded paks", Cvar::SYSTEMINFO | Cvar::ROM, "");
static Cvar::Cvar<std::string> cvar_contact(
"contact", "contact information to reach out to the server admin when needed: forum or chat nickname, mail address…",
Cvar::SERVERINFO, "" );
static Cvar::Cvar<bool> sv_useBaseline(
"sv_useBaseline", "send entity baseline for non-snapshot delta compression", Cvar::NONE, true);

Expand Down Expand Up @@ -437,6 +440,14 @@ void SV_SpawnServer(std::string pakname, std::string mapname)
SV_ShutdownGameProgs();

PrintBanner( "Server Initialization" )

if ( !SV_Private(ServerPrivate::NoAdvertise)
&& sv_networkScope.Get() >= 2
&& cvar_contact.Get().empty() )
{
Log::Warn( "The contact information isn't set, it is requested for public servers." );
}

Log::Notice( "Map: %s", mapname );

// if not running a dedicated server CL_MapLoading will connect the client to the server
Expand Down

0 comments on commit 70d9586

Please sign in to comment.