forked from asherkin/connect
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconnect.inc
59 lines (54 loc) · 2.53 KB
/
connect.inc
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#if defined _connect_included
#endinput
#endif
#define _connect_included
/**
* Steam authentication session response codes
*/
enum EAuthSessionResponse
{
k_EAuthSessionResponseOK = 0, // Steam has verified the user is online, the ticket is valid and ticket has not been reused
k_EAuthSessionResponseUserNotConnectedToSteam = 1, // The user in question is not connected to Steam
k_EAuthSessionResponseNoLicenseOrExpired = 2, // The license has expired or user doesn't have license for this App ID
k_EAuthSessionResponseVACBanned = 3, // The user is VAC banned for this game
k_EAuthSessionResponseLoggedInElseWhere = 4, // The user account has logged in elsewhere
k_EAuthSessionResponseVACCheckTimedOut = 5, // VAC has been unable to perform anti-cheat checks on this user
k_EAuthSessionResponseAuthTicketCanceled = 6, // The ticket has been canceled by the issuer
k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed = 7, // This ticket has already been used
k_EAuthSessionResponseAuthTicketInvalid = 8, // This ticket is not from a user instance currently connected to Steam
k_EAuthSessionResponsePublisherIssuedBan = 9, // The user is banned for this game via web API
};
/**
* Called when Steam responds to an authentication ticket validation request.
*
* @param steamID Client's Steam ID in STEAM_X:Y:Z format
* @param eAuthSessionResponse The response code from Steam
* @return Change authentication session response
*/
forward EAuthSessionResponse OnValidateAuthTicketResponse(const char[] steamID, EAuthSessionResponse eAuthSessionResponse);
/**
* Called when a client attempts to connect to the server.
*
* @param name Client's name
* @param password Client's password
* @param ip Client's IP address
* @param steamID Client's Steam ID in STEAM_X:Y:Z format
* @param sRejectReason Buffer to store rejection reason if player is denied access
* @return Allow or reject player connection
*/
forward bool OnClientPreConnectEx(const char[] name, char password[255], const char[] ip, const char[] steamID, char rejectReason[255]);
public Extension __ext_Connect =
{
name = "Connect",
file = "connect.ext",
#if defined AUTOLOAD_EXTENSIONS
autoload = 1,
#else
autoload = 0,
#endif
#if defined REQUIRE_EXTENSIONS
required = 1,
#else
required = 0,
#endif
}