VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::VoteRequest Struct Reference

#include <Vote.hpp>

Public Attributes

std::string Title
 
std::string Detail
 
int DurationMs = 30000
 
int Caller = -1
 
std::function< bool(const VoteTally &)> Passed
 
std::function< void(bool passed, VoteEndReason reason)> Finished
 

Detailed Description

A yes/no vote for Vote::Start.

Definition at line 41 of file Vote.hpp.

Member Data Documentation

◆ Caller

int VoltMod::VoteRequest::Caller = -1

Whose name the panel credits; -1 for the server.

Definition at line 50 of file Vote.hpp.

◆ Detail

std::string VoltMod::VoteRequest::Detail

The token's detail string, often a map or player name.

Definition at line 46 of file Vote.hpp.

◆ DurationMs

int VoltMod::VoteRequest::DurationMs = 30000

How long before the vote closes itself.

Definition at line 48 of file Vote.hpp.

◆ Finished

std::function<void(bool passed, VoteEndReason reason)> VoltMod::VoteRequest::Finished

Called after the pass/fail panel is sent, with what Passed decided.

Definition at line 54 of file Vote.hpp.

◆ Passed

std::function<bool(const VoteTally&)> VoltMod::VoteRequest::Passed

Decides whether the vote passed. Called once when voting ends, never for a cancelled vote.

Definition at line 52 of file Vote.hpp.

◆ Title

std::string VoltMod::VoteRequest::Title

A #SFUI_vote... or #Panorama_vote... token the client already has; other text does not render.

Definition at line 44 of file Vote.hpp.


The documentation for this struct was generated from the following file: