- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserverplugin.cpp
More file actions
Latest commit
66 lines (42 loc) · 1.79 KB
/
Copy pathserverplugin.cpp
File metadata and controls
66 lines (42 loc) · 1.79 KB
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
#include"serverplugin.h"
#include"subhook/subhook_unix.c"
usingnamespacesubhook;
Hook g_memcpy_hook;
CBufferFix g_ServerPlugin;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CBufferFix, IServerPluginCallbacks, INTERFACEVERSION_ISERVERPLUGINCALLBACKS, g_ServerPlugin);
CBufferFix::CBufferFix() {}
CBufferFix::~CBufferFix() {}
voidmemcpy_Hook(void *dest, constvoid* src, size_t count) {
memmove(dest, src, count);
}
boolCBufferFix::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory) {
ConMsg(0, "----------\nBufferFix loaded!\n----------\n");
g_memcpy_hook.Install((void *)memcpy, (void *)memcpy_Hook);
returntrue;
}
voidCBufferFix::Unload(void) {
if (g_memcpy_hook.IsInstalled()) g_memcpy_hook.Remove();
}
voidCBufferFix::Pause(void) { }
voidCBufferFix::UnPause(void) {}
constchar *CBufferFix::GetPluginDescription(void) {
return"Buffer Fix [1.0.0]";
}
voidCBufferFix::LevelInit(charconst *pMapName) {}
voidCBufferFix::ServerActivate( edict_t *pEdictList, int edictCount, int clientMax ) {}
voidCBufferFix::GameFrame(bool simulating) {}
voidCBufferFix::LevelShutdown(void) {}
voidCBufferFix::ClientActive(edict_t *pEntity) {}
voidCBufferFix::ClientDisconnect(edict_t *pEntity) {}
voidCBufferFix::ClientPutInServer(edict_t *pEntity, charconst *playername) {}
voidCBufferFix::SetCommandClient(int index) {}
voidCBufferFix::ClientSettingsChanged(edict_t *pEdict) {}
PLUGIN_RESULTCBufferFix::ClientConnect(bool *bAllowConnect, edict_t *pEntity, constchar *pszName, constchar *pszAddress, char *reject, int maxrejectlen) {
returnPLUGIN_CONTINUE;
}
PLUGIN_RESULTCBufferFix::ClientCommand(edict_t *pEntity) {
returnPLUGIN_CONTINUE;
}
PLUGIN_RESULTCBufferFix::NetworkIDValidated(constchar *pszUserName, constchar *pszNetworkID) {
returnPLUGIN_CONTINUE;
}