-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.h
90 lines (63 loc) · 2.2 KB
/
plugin.h
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#pragma once
#include "hl2sdk/public/engine/iserverplugin.h"
class Plugin : public IServerPluginCallbacks {
public:
const char* GetPluginDescription() override;
bool Load(
CreateInterfaceFn interfaceFactory,
CreateInterfaceFn gameServerFactory) override;
void Unload() override;
void Pause() override;
void UnPause() override;
void LevelInit(char const* pMapName) override;
void ServerActivate(
edict_t* pEdictList,
int edictCount,
int clientMax) override;
void GameFrame(bool simulating) override;
void LevelShutdown() override;
void OnQueryCvarValueFinished(
QueryCvarCookie_t iCookie,
edict_t* pPlayerEntity,
EQueryCvarValueStatus eStatus,
const char* pCvarName,
const char* pCvarValue) override;
void OnEdictAllocated(edict_t* edict) override;
void OnEdictFreed(const edict_t* edict) override;
PLUGIN_RESULT ClientConnect(
bool* bAllowConnect,
edict_t* pEntity,
const char* pszName,
const char* pszAddress,
char* reject,
int maxrejectlen) override;
void ClientFullyConnect(edict_t* pEntity);
void ClientPutInServer(edict_t* entity, const char* playername) override;
void ClientActive(edict_t* pEntity) override;
void ClientDisconnect(edict_t* pEntity) override;
void SetCommandClient(int index) override;
void ClientSettingsChanged(edict_t* pEdict) override;
PLUGIN_RESULT ClientCommand(edict_t* pEntity, const CCommand& args) override;
PLUGIN_RESULT NetworkIDValidated(
const char* pszUserName,
const char* pszNetworkID) override;
bool BNetworkCryptKeyCheckRequired(
uint32 unFromIP,
uint16 usFromPort,
uint32 unAccountIdProvidedByClient,
bool bClientWantsToUseCryptKey) override;
bool BNetworkCryptKeyValidate(
uint32 unFromIP,
uint16 usFromPort,
uint32 unAccountIdProvidedByClient,
int nEncryptionKeyIndexFromClient,
int numEncryptedBytesFromClient,
byte* pbEncryptedBufferFromClient,
byte* pbPlainTextKeyForNetchan) override;
};
Plugin plugin_binding;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(
Plugin,
IServerPluginCallbacks,
INTERFACEVERSION_ISERVERPLUGINCALLBACKS,
plugin_binding);