diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 1a24ae1c8..2bec70ec9 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3950,6 +3950,8 @@ consvar_t cv_netticbuffer = {"netticbuffer", "1", CV_SAVE, netticbuffer_cons_t, static void Joinable_OnChange(void); +consvar_t cv_joinrefusemessage = {"joinrefusemessage", "The server is not accepting joins for the moment.", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; + consvar_t cv_allownewplayer = {"allowjoin", "On", CV_SAVE|CV_CALL, CV_OnOff, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL}; #ifdef VANILLAJOINNEXTROUND @@ -4573,7 +4575,7 @@ static void HandleConnect(SINT8 node) } else if (!cv_allownewplayer.value && node) { - SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment.")); + SV_SendRefuse(node, M_GetText(cv_joinrefusemessage.string)); } else if (connectedplayers >= maxplayers) { diff --git a/src/d_clisrv.h b/src/d_clisrv.h index b969fff9d..13c2bc353 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -567,7 +567,7 @@ extern consvar_t #ifdef VANILLAJOINNEXTROUND cv_joinnextround, #endif - cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; + cv_netticbuffer, cv_allownewplayer, cv_joinrefusemessage, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; extern consvar_t cv_connectawaittime; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2db4024bc..45cd95a1c 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -784,6 +784,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_httpsource); #ifndef NONET CV_RegisterVar(&cv_allownewplayer); + CV_RegisterVar(&cv_joinrefusemessage); CV_RegisterVar(&cv_chatlogsize); #ifdef VANILLAJOINNEXTROUND CV_RegisterVar(&cv_joinnextround);