forked from packetflinger/q2admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathg_vote.h
More file actions
37 lines (31 loc) · 978 Bytes
/
g_vote.h
File metadata and controls
37 lines (31 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Q2Admin
* Voting stuff
*/
#pragma once
#define VOTEFILE "q2a_vote.cfg"
#define VOTECMD "[sv] !votecmd [SW/EX/RE] \"command\"\n"
#define VOTEDELCMD "[sv] !votedel votenum\n"
#define VOTE_MAXCMDS 1024
#define DEFAULTVOTECOMMAND "vote"
#define VOTE_SW 0
#define VOTE_EX 1
#define VOTE_RE 2
typedef struct {
char *votecmd;
byte type;
re_t r;
} votecmd_t;
qboolean checkforvotecmd(char *cp, int votecmd);
void checkOnVoting(void);
qboolean checkVoteCommand(char *votecmd);
void displayNextVote(edict_t *ent, int client, long floodcmd);
void displayVote(void);
void freeVoteLists(void);
void listvotesRun(int startarg, edict_t *ent, int client);
qboolean ReadVoteFile(char *votename);
void readVoteLists(void);
void reloadVoteFileRun(int startarg, edict_t *ent, int client);
void run_vote(edict_t *ent, int client);
void votecmdRun(int startarg, edict_t *ent, int client);
void voteDelRun(int startarg, edict_t *ent, int client);