CPureServerWhitelist::Encode
0x001d75a0 · 234 bytes · __thiscall
_ZN20CPureServerWhitelist6EncodeER10CUtlBuffer
Decompiled
undefined (2 params)
/* CPureServerWhitelist::Encode(CUtlBuffer&) */
void __thiscall CPureServerWhitelist::Encode(CPureServerWhitelist *this,CUtlBuffer *param_1)
{
CPureServerWhitelist CVar1;
char cVar2;
int iVar3;
EncodeCommandList(this,(CUtlDict *)(this + 8),param_1);
EncodeCommandList(this,(CUtlDict *)(this + 0x2c),param_1);
EncodeCommandList(this,(CUtlDict *)(this + 0x50),param_1);
CVar1 = this[0x88];
if (((((byte)param_1[0x15] & 1) != 0) && (*(int *)(param_1 + 0x10) != 0)) &&
(*(char *)(*(int *)param_1 + ((*(int *)(param_1 + 0x10) + -1) - *(int *)(param_1 + 0x20))) ==
'\n')) {
if (((byte)param_1[0x15] & 0x10) == 0) {
iVar3 = *(int *)(param_1 + 0x18);
}
else {
iVar3 = 0;
}
while (iVar3 = iVar3 + -1, -1 < iVar3) {
cVar2 = CUtlBuffer::CheckPut(param_1,1);
if (cVar2 != '\0') {
*(undefined1 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = 9
;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
}
}
}
cVar2 = CUtlBuffer::CheckPut(param_1,1);
if (cVar2 == '\0') {
return;
}
*(CPureServerWhitelist *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20)))
= CVar1;
*(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
CUtlBuffer::AddNullTermination(param_1);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.