Xonotic
|
#include "vote.qh"
#include <common/command/_mod.qh>
#include <common/constants.qh>
#include <common/gamemodes/_mod.qh>
#include <common/items/inventory.qh>
#include <common/mapinfo.qh>
#include <common/net_linked.qh>
#include <common/notifications/all.qh>
#include <common/playerstats.qh>
#include <common/stats.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <server/client.qh>
#include <server/command/banning.qh>
#include <server/command/common.qh>
#include <server/damage.qh>
#include <server/gamelog.qh>
#include <server/intermission.qh>
#include <server/mutators/_mod.qh>
#include <server/race.qh>
#include <server/round_handler.qh>
#include <server/scores.qh>
#include <server/teamplay.qh>
#include <server/weapons/accuracy.qh>
#include <server/world.qh>
Go to the source code of this file.
Macros | |
#define | spectators_allowed (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || intermission_running))) |
#define | VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat(" ^2", name, "^7: ", description)); } } |
#define | VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(2))) { function; return; } } } |
#define | VOTE_COMMAND(name, function, description, assignment) { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } } |
#define | VOTE_COMMANDS(request, caller, arguments, command) |
#define spectators_allowed (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || intermission_running))) |
Definition at line 205 of file vote.qc.
Referenced by VoteCommand_call(), VoteCommand_master(), and VoteCount().
#define VOTE_COMMAND | ( | name, | |
function, | |||
description, | |||
assignment | |||
) | { if (Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat(" ^2", name, "^7: ", description)); } } |
#define VOTE_COMMAND | ( | name, | |
function, | |||
description, | |||
assignment | |||
) | { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(2))) { function; return; } } } |
#define VOTE_COMMAND | ( | name, | |
function, | |||
description, | |||
assignment | |||
) | { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } } |
#define VOTE_COMMANDS | ( | request, | |
caller, | |||
arguments, | |||
command | |||
) |
Definition at line 1204 of file vote.qc.
Referenced by VoteCommand_macro_command(), and VoteCommand_macro_help().
void Nagger_Init | ( | ) |
Definition at line 97 of file vote.qc.
References nagger, Nagger_SendEntity(), and new_pure.
Referenced by spawnfunc().
void Nagger_ReadyCounted | ( | ) |
Definition at line 112 of file vote.qc.
Referenced by ReadyCount(), and ReadyRestart_force().
Definition at line 35 of file vote.qc.
References BIT, entity(), IS_REAL_CLIENT, maxclients, nextent(), readycount, vote_accept_count, vote_called, vote_called_display, vote_needed_overall, vote_reject_count, warmup_stage, WriteByte(), WriteChar(), and WriteString().
Referenced by Nagger_Init().
void Nagger_VoteChanged | ( | ) |
Definition at line 102 of file vote.qc.
Referenced by VoteCommand_call(), VoteCommand_master(), and VoteReset().
void Nagger_VoteCountChanged | ( | ) |
Definition at line 107 of file vote.qc.
Referenced by VoteCount().
string OriginalCallerName | ( | ) |
Definition at line 118 of file vote.qc.
References IS_REAL_CLIENT, vote_caller, and vote_caller_name.
Referenced by VoteAccept(), VoteCommand_call(), VoteCommand_master(), VoteCommand_status(), VoteReject(), VoteStop(), and VoteTimeout().
Definition at line 837 of file vote.qc.
References autocvar_sv_vote_commands, print_to(), and strcat().
Referenced by VoteCommand_call(), and VoteCommand_macro_help().
void ReadyCount | ( | ) |
Definition at line 498 of file vote.qc.
References bound(), cvar(), floor(), FOREACH_CLIENT, INGAME_JOINED, IS_PLAYER, IS_REAL_CLIENT, Nagger_ReadyCounted(), readycount, and ReadyRestart().
Referenced by ClientCommand_ready(), ClientDisconnect(), and PutObserverInServer().
Definition at line 484 of file vote.qc.
References cvar(), intermission_running, localcmd, MUTATOR_CALLHOOK, race_completing, ReadyRestart_force(), and warmup_stage.
Referenced by CheckRules_World(), GameCommand_allready(), GameCommand_resetmatch(), ReadyCount(), and StartFrame().
Definition at line 426 of file vote.qc.
References autocvar_sv_eventlog, autocvar_sv_timeout, autocvar_sv_timeout_number, autocvar_teamplay_lockonrestart, autocvar_timelimit_overtime, bprint(), checkrules_overtimesadded, checkrules_suddendeathend, checkrules_suddendeathwarning, CS(), cvar_set(), entity(), FOREACH_CLIENT, ftos(), g_race_qualifying, GameLogEcho(), IS_PLAYER, IS_REAL_CLIENT, localcmd, lockteams, Nagger_ReadyCounted(), new_pure, readycount, ReadyRestart_think(), reset_map(), RESTART_COUNTDOWN, setthink, sv_ready_restart_after_countdown, teamplay, time, VoteReset(), and warmup_stage.
Referenced by assault_new_round(), and ReadyRestart().
Definition at line 419 of file vote.qc.
References reset_map().
Referenced by ReadyRestart_force().
Definition at line 339 of file vote.qc.
References accuracy_reset(), CS(), entity(), FOREACH_CLIENT, FOREACH_ENTITY_FLOAT_ORDERED, FOREACH_ENTITY_ORDERED, if(), Inventory_clear(), IS_CLIENT, IS_NOT_A_CLIENT, IS_PLAYER, MUTATOR_CALLHOOK, player_powerups_remove_all(), PS, pure_data, PutClientInServer(), round_handler_IsActive, round_handler_Reset(), Score_ClearAll(), shuffleteams(), shuffleteams_on_reset_map, time, and Unfreeze().
Referenced by ReadyRestart_force(), ReadyRestart_think(), and round_handler_Think().
Definition at line 573 of file vote.qc.
References autocvar_sv_vote_override_mostrecent, Map_IsRecent(), MapInfo_CheckMap(), MapInfo_FixName(), print_to(), strcat(), and string_null.
Referenced by VoteCommand_parse().
void VoteAccept | ( | ) |
Definition at line 158 of file vote.qc.
References bprint(), localcmd, NULL, OriginalCallerName(), strcat(), vote_called, vote_called_command, vote_called_display, vote_caller, VOTE_MASTER, and VoteReset().
Referenced by VoteCount().
Definition at line 1264 of file vote.qc.
References argv(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), print_to(), strcat(), VoteCommand_macro_command(), and VoteCommand_macro_help().
Referenced by COMMON_COMMAND().
Definition at line 803 of file vote.qc.
References autocvar_sv_vote_change, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), msg_entity, print_to(), strcat(), vote_called, VOTE_SELECT_ABSTAIN, VOTE_SELECT_NULL, and VoteCount().
Definition at line 842 of file vote.qc.
References autocvar_sv_eventlog, autocvar_sv_vote_call, autocvar_sv_vote_commands, autocvar_sv_vote_gamestart, autocvar_sv_vote_timeout, autocvar_sv_vote_wait, bprint(), ceil(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, FOREACH_CLIENT, ftos(), GameLogEcho(), GetCallerName(), GetCommandPrefix(), IS_CLIENT, IS_PLAYER, IS_REAL_CLIENT, msg_entity, Nagger_VoteChanged(), NULL, OriginalCallerName(), print_available_commands_to(), print_to(), spectators_allowed, strcat(), strzone(), time, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_NORMAL, VOTE_NULL, vote_parsed_command, vote_parsed_display, VOTE_SELECT_ACCEPT, VoteCommand_checknasty(), VoteCommand_extractcommand(), VoteCommand_parse(), and VoteCount().
Definition at line 523 of file vote.qc.
References VC_ASGNMNT_BOTH, VC_ASGNMNT_CLIENTONLY, and VC_ASGNMNT_SERVERONLY.
Definition at line 601 of file vote.qc.
References argv(), cvar_string(), CVAR_TYPEFLAG_EXISTS, LOG_INFO, stof(), strcat(), strlen(), strstrofs, and substring().
Referenced by VoteCommand_parse().
Definition at line 564 of file vote.qc.
References strcat(), strstrofs, and VoteCommand_checkreplacements().
Referenced by VoteCommand_parse().
Definition at line 544 of file vote.qc.
References strstrofs.
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 555 of file vote.qc.
Referenced by VoteCommand_checkinlist().
Definition at line 534 of file vote.qc.
References argv_end_index, argv_start_index, and substring().
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 1248 of file vote.qc.
References CMD_REQUEST_COMMAND, and VOTE_COMMANDS.
Referenced by VoteCommand().
Definition at line 1215 of file vote.qc.
References argv(), CMD_REQUEST_USAGE, cvar_string(), CVAR_TYPEFLAG_EXISTS, GetCommandPrefix(), print_available_commands_to(), print_to(), strcat(), and VOTE_COMMANDS.
Referenced by VoteCommand().
Definition at line 940 of file vote.qc.
References argv(), autocvar_sv_eventlog, autocvar_sv_vote_commands, autocvar_sv_vote_master, autocvar_sv_vote_master_callable, autocvar_sv_vote_master_commands, autocvar_sv_vote_master_password, autocvar_sv_vote_timeout, autocvar_sv_vote_wait, bprint(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, ftos(), GameLogEcho(), GetCallerName(), GetCommandPrefix(), IS_PLAYER, localcmd, Nagger_VoteChanged(), OriginalCallerName(), print_to(), spectators_allowed, strcat(), strzone(), time, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_MASTER, vote_parsed_command, vote_parsed_display, VOTE_SELECT_ACCEPT, VoteCommand_checknasty(), VoteCommand_extractcommand(), VoteCommand_parse(), and VoteCount().
Definition at line 1060 of file vote.qc.
References autocvar_sv_vote_change, autocvar_sv_vote_no_stops_vote, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), msg_entity, print_to(), strcat(), vote_called, vote_caller, VOTE_SELECT_NULL, VOTE_SELECT_REJECT, VoteCount(), and VoteStop().
int VoteCommand_parse | ( | entity | caller, |
string | vote_command, | ||
string | vote_list, | ||
float | startpos, | ||
int | argc | ||
) |
Definition at line 675 of file vote.qc.
References argv(), argv_start_index, autocvar_g_ban_default_bantime, autocvar_g_ban_default_masksize, autocvar_sv_vote_limit, autocvar_timelimit_max, autocvar_timelimit_min, bound(), entity(), etof(), ftos(), GetClientErrorString, GetIndexedEntity(), MUT_VOTEPARSE_CONTINUE, MUT_VOTEPARSE_INVALID, MUT_VOTEPARSE_SUCCESS, MUT_VOTEPARSE_UNACCEPTABLE, MUTATOR_CALLHOOK, next_token, print_to(), stof(), strcat(), strlen(), strzone(), substring(), ValidateMap(), VerifyClientEntity(), vote_parsed_command, vote_parsed_display, VoteCommand_checkargs(), VoteCommand_checkinlist(), and warmup_stage.
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 1098 of file vote.qc.
References CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), OriginalCallerName(), print_to(), strcat(), vote_called, and vote_called_display.
Definition at line 1120 of file vote.qc.
References CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), print_to(), strcat(), vote_called, vote_caller, and VoteStop().
Definition at line 1142 of file vote.qc.
References autocvar_sv_vote_change, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, GetCommandPrefix(), msg_entity, print_to(), strcat(), vote_called, VOTE_SELECT_ACCEPT, VOTE_SELECT_NULL, and VoteCount().
Definition at line 207 of file vote.qc.
References autocvar_sv_vote_majority_factor, autocvar_sv_vote_majority_factor_of_voted, autocvar_sv_vote_master_playerlimit, bound(), floor(), FOREACH_CLIENT, IS_CLIENT, IS_PLAYER, IS_REAL_CLIENT, min(), Nagger_VoteCountChanged(), print_to(), spectators_allowed, time, vote_abstain_count, vote_accept_count, vote_called, vote_caller, vote_endtime, VOTE_MASTER, vote_needed_overall, vote_reject_count, VOTE_SELECT_ABSTAIN, VOTE_SELECT_ACCEPT, VoteAccept(), VoteReject(), VoteReset(), VoteSpam(), and VoteTimeout().
Referenced by ClientDisconnect(), PutObserverInServer(), VoteCommand_abstain(), VoteCommand_call(), VoteCommand_master(), VoteCommand_no(), VoteCommand_yes(), and VoteThink().
void VoteReject | ( | ) |
Definition at line 171 of file vote.qc.
References bprint(), NULL, OriginalCallerName(), vote_called_display, and VoteReset().
Referenced by VoteCount().
void VoteReset | ( | ) |
Definition at line 128 of file vote.qc.
References FOREACH_CLIENT, Nagger_VoteChanged(), NULL, strfree, string_null, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_NULL, vote_parsed_command, and vote_parsed_display.
Referenced by InitGameplayMode(), NextLevel(), ReadyRestart_force(), VoteAccept(), VoteCount(), VoteReject(), VoteStop(), and VoteTimeout().
Definition at line 185 of file vote.qc.
References autocvar_sv_eventlog, bprint(), ftos(), GameLogEcho(), strcat(), vote_abstain_count, vote_accept_count, and vote_reject_count.
Referenced by VoteCount().
Definition at line 149 of file vote.qc.
References autocvar_sv_eventlog, autocvar_sv_vote_stop, bprint(), ftos(), GameLogEcho(), GetCallerName(), OriginalCallerName(), strcat(), time, vote_caller, and VoteReset().
Referenced by VoteCommand_no(), and VoteCommand_stop().
void VoteThink | ( | ) |
Definition at line 324 of file vote.qc.
References time, vote_endtime, and VoteCount().
Referenced by CheckRules_World().
void VoteTimeout | ( | ) |
Definition at line 178 of file vote.qc.
References bprint(), NULL, OriginalCallerName(), vote_called_display, and VoteReset().
Referenced by VoteCount().