set sv_vote_master_commands "movetored movetoblue movetoyellow movetopink movetospec" "extra commands which vote masters can execute by themselves, along with the normal sv_vote_commands" // maybe add kickban here (but then sv_vote_master 0)
set sv_vote_master 0 "allows the use of the vote master system"
set sv_vote_master_callable 0 "when set, users can use \"vmaster\" to call a vote to become master of voting commands"
+set sv_vote_master_ids "" "space-separated list of player IDs (signed public key fingerprints) which will be logged in as master automatically"
set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master, then run master commands directly using vdo"
set sv_vote_master_playerlimit 2 "minimum number of players needed for a player to be allowed to vote for master"
set sv_vote_no_stops_vote 1 "allow the vote caller to stop their own vote simply by voting no"
LOG_WARN("Engine lacks HTTP support, XonStat and map downloads are unavailable.");
if (!checkextension("DP_CRYPTO"))
- LOG_WARN("Engine lacks DP_CRYPTO, Player IDs (required for XonStat and CTS/CTF records) are unavailable.");
+ LOG_WARN("Engine lacks DP_CRYPTO, Player IDs (required for XonStat, CTS/CTF records and pubkey authentication) are unavailable.");
#ifdef SVQC // change to GAMEQC if/when we use nudgeoutofsolid in CSQC
if (checkextension("DP_QC_NUDGEOUTOFSOLID"))
if (get_nextmap() != "")
Send_NextMap_To_Player(this);
+
+ // cvar hook/callback TODO: recheck this when the cvar is changed
+ if (autocvar_sv_vote_master_ids != "" && this.crypto_idfp_signed)
+ if (strstrofs(autocvar_sv_vote_master_ids, this.crypto_idfp, 0) >= 0)
+ this.vote_master = true;
}
.string shootfromfixedorigin;
bool autocvar_sv_vote_master;
bool autocvar_sv_vote_master_callable;
string autocvar_sv_vote_master_commands;
+string autocvar_sv_vote_master_ids;
string autocvar_sv_vote_master_password;
int autocvar_sv_vote_master_playerlimit;
bool autocvar_sv_vote_no_stops_vote;
BADCVAR("serverconfig");
BADCVAR("sv_autoscreenshot");
BADCVAR("sv_heartbeatperiod");
+ BADCVAR("sv_vote_master_ids");
BADCVAR("sv_vote_master_password");
BADCVAR("sys_colortranslation");
BADCVAR("sys_specialcharactertranslation");
BADCVAR("sv_vote_call");
BADCVAR("sv_vote_commands");
BADCVAR("sv_vote_majority_factor");
- BADCVAR("sv_vote_master");
- BADCVAR("sv_vote_master_commands");
- BADCVAR("sv_vote_master_password");
+ BADPREFIX("sv_vote_master");
BADCVAR("sv_vote_simple_majority_factor");
BADVALUE("sys_ticrate", "0.0078125");
BADVALUE("sys_ticrate", "0.015625");