FS2_Open
Open source remastering of the Freespace 2 engine
multi_kick.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _MULTIPLAYER_KICK_HEADER_FILE
13 #define _MULTIPLAYER_KICK_HEADER_FILE
14 
15 // ----------------------------------------------------------------------------------
16 // KICK DEFINES/VARS
17 //
18 
19 struct net_addr;
20 struct net_player;
21 
22 // special reasons for kicking players
23 #define KICK_REASON_NORM 0 // plain old kick
24 #define KICK_REASON_BAD_XFER 1 // error xferring mission
25 #define KICK_REASON_CANT_XFER 2 // can't xfer a builtin mission
26 #define KICK_REASON_INGAME_ENDED 3 // kicked while ingame joining a mission about to end
27 
28 
29 // ----------------------------------------------------------------------------------
30 // KICK FUNCTIONS
31 //
32 
33 // initialize all kicking details (ban lists, etc). it is safe to call this function at any time
34 void multi_kick_init();
35 
36 // process all kick details (disconnecting players who have been kicked but haven't closed their socket)
37 void multi_kick_process();
38 
39 // attempt to kick a player. return success or fail
40 void multi_kick_player(int player_index, int ban = 1, int reason = KICK_REASON_NORM);
41 
42 // is this net address currently kicked and banded
44 
45 // debug console function called to determine which player to kick
46 void multi_dcf_kick();
47 
48 // fill in the passed string with the appropriate "kicked" string
49 void multi_kick_get_text(net_player *pl, int reason, char *str);
50 
51 #endif
int multi_kick_is_banned(net_addr *addr)
Definition: multi_kick.cpp:121
void multi_dcf_kick()
Definition: multi_kick.cpp:138
void multi_kick_process()
Definition: multi_kick.cpp:64
void multi_kick_get_text(net_player *pl, int reason, char *str)
Definition: multi_kick.cpp:165
void multi_kick_init()
Definition: multi_kick.cpp:56
void multi_kick_player(int player_index, int ban=1, int reason=KICK_REASON_NORM)
Definition: multi_kick.cpp:82
#define KICK_REASON_NORM
Definition: multi_kick.h:23
GLenum const GLvoid * addr
Definition: Glext.h:9092