]> icculus.org git repositories - taylor/freespace2.git/blob - include/multi_kick.h
finished cfilesystem.
[taylor/freespace2.git] / include / multi_kick.h
1 /*
2  * $Logfile: /Freespace2/code/Network/multi_kick.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * $Log$
8  * Revision 1.2  2002/05/27 00:40:47  theoddone33
9  * Fix net_addr vs net_addr_t
10  *
11  * Revision 1.1.1.1  2002/05/03 03:28:12  root
12  * Initial import.
13  *  
14  * 
15  * 3     11/05/98 5:55p Dave
16  * Big pass at reducing #includes
17  * 
18  * 2     10/07/98 10:53a Dave
19  * Initial checkin.
20  * 
21  * 1     10/07/98 10:50a Dave
22  * 
23  * 3     9/11/98 4:14p Dave
24  * Fixed file checksumming of < file_size. Put in more verbose kicking and
25  * PXO stats store reporting.
26  * 
27  * 2     3/24/98 5:00p Dave
28  * Fixed several ui bugs. Put in pre and post voice stream playback sound
29  * fx. Put in error specific popups for clients getting dropped from games
30  * through actions other than their own.
31  * 
32  * 1     2/12/98 4:38p Dave
33  * Multiplayer kick functionality
34  * 
35  * $NoKeywords: $
36  */
37 #ifndef _MULTIPLAYER_KICK_HEADER_FILE
38 #define _MULTIPLAYER_KICK_HEADER_FILE
39
40 // ----------------------------------------------------------------------------------
41 // KICK DEFINES/VARS
42 //
43
44 struct net_player;
45
46 // special reasons for kicking players
47 #define KICK_REASON_NORM                                0                               // plain old kick
48 #define KICK_REASON_BAD_XFER                    1                               // error xferring mission
49 #define KICK_REASON_CANT_XFER                   2                               // can't xfer a builtin mission
50 #define KICK_REASON_INGAME_ENDED                3                               // kicked while ingame joining a mission about to end
51
52
53 // ----------------------------------------------------------------------------------
54 // KICK FUNCTIONS
55 //
56
57 // initialize all kicking details (ban lists, etc). it is safe to call this function at any time
58 void multi_kick_init();
59
60 // process all kick details (disconnecting players who have been kicked but haven't closed their socket)
61 void multi_kick_process();
62
63 // attempt to kick a player. return success or fail
64 void multi_kick_player(int player_index, int ban = 1, int reason = KICK_REASON_NORM);
65
66 // is this net address currently kicked and banded
67 int multi_kick_is_banned(net_addr_t *addr);
68
69 // debug console function called to determine which player to kick
70 void multi_dcf_kick();
71
72 // fill in the passed string with the appropriate "kicked" string
73 void multi_kick_get_text(net_player *pl, int reason, char *str);
74
75 #endif
76