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