diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 4a32d104c8f49a0e16391c636e33d08724b771eb..fc07205e01457e43a1bf099aa7ed44fbee2ede76 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -734,6 +734,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_chatvote_time); CV_RegisterVar(&cv_chatvote_minimum); CV_RegisterVar(&cv_chatvote_percentage); + CV_RegisterVar(&cv_chatvote_nag); } // ========================================================================= diff --git a/src/d_vote.c b/src/d_vote.c index 83cb7874bc310775b3f0afaf0520f7f350adb402..8211fff50493e4f8843b5662b5e5582ede2f5866 100644 --- a/src/d_vote.c +++ b/src/d_vote.c @@ -14,17 +14,19 @@ See the 'LICENSE' file for more details. #include "command.h" #include "g_game.h" -#define CVAR( name, default, type ) \ +#define CVAR( name, default, ...) \ consvar_t cv_chatvote_ ## name =\ {\ "chatvote_" #name, default,\ - CV_SAVE, type,\ + CV_SAVE, __VA_ARGS__\ } CVAR (time, "20", CV_Unsigned); CVAR (minimum, "0", CV_PlayerCount); CVAR (percentage, "0", CV_Percent); +CVAR (nag, "VOTE NOW FUCKER"); + #undef CVAR struct D_ChatVote d_chatvote; @@ -178,7 +180,8 @@ D_StartVote (int type, int target, int from) "Vote now!", player_names[target], D_VoteTime())); - D_CSay("VOTE NOW FUCKER"); + if (cv_chatvote_nag.string[0]) + D_CSay(cv_chatvote_nag.string); } } diff --git a/src/d_vote.h b/src/d_vote.h index 86413312d41c432c5ba8bc0f73616d7c463c4380..f0f12e050292c516051d61830be900cabd86801d 100644 --- a/src/d_vote.h +++ b/src/d_vote.h @@ -42,6 +42,7 @@ struct D_ChatVote extern consvar_t cv_chatvote_time; extern consvar_t cv_chatvote_minimum; extern consvar_t cv_chatvote_percentage; +extern consvar_t cv_chatvote_nag; extern struct D_ChatVote d_chatvote;