Skip to content

Commit 68111c1

Browse files
committed
sv_init: add the “abuse” cvar and server info string to contain contact information to reach out the server admin when needed
1 parent ffd8d2a commit 68111c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/engine/server/sv_init.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ static Cvar::Cvar<std::string> cvar_pakname(
5252
"pakname", "pak containing current map", Cvar::SERVERINFO | Cvar::ROM, "");
5353
static Cvar::Cvar<std::string> sv_paks(
5454
"sv_paks", "currently loaded paks", Cvar::SYSTEMINFO | Cvar::ROM, "");
55+
static Cvar::Cvar<std::string> cvar_abuse(
56+
"abuse", "contact information to reach out the server admin when needed (forum or chat nickname, mail address…)",
57+
Cvar::SERVERINFO, "" );
5558
static Cvar::Cvar<bool> sv_useBaseline(
5659
"sv_useBaseline", "send entity baseline for non-snapshot delta compression", Cvar::NONE, true);
5760

@@ -437,6 +440,12 @@ void SV_SpawnServer(std::string pakname, std::string mapname)
437440
SV_ShutdownGameProgs();
438441

439442
PrintBanner( "Server Initialization" )
443+
444+
if ( SV_Private( ServerPrivate::Public ) && cvar_abuse.Get().empty() )
445+
{
446+
Log::Warn( "The abuse contact information isn't set, it is requested for public servers." );
447+
}
448+
440449
Log::Notice( "Map: %s", mapname );
441450

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

0 commit comments

Comments
 (0)