CAddressList::AddRemote
0x001058d0 · 237 bytes · __thiscall
_ZN12CAddressList9AddRemoteEPKcS1_
Decompiled
undefined (3 params)
/* CAddressList::AddRemote(char const*, char const*) */
void __thiscall CAddressList::AddRemote(CAddressList *this,char *param_1,char *param_2)
{
char cVar1;
int in_GS_OFFSET;
CUtlString local_4c [16];
CUtlString local_3c [16];
netadr_s local_2c [12];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar1 = IsRemoteInList(this,param_1);
if (cVar1 == '\0') {
CUtlString::CUtlString(local_4c);
/* try { // try from 00105931 to 00105935 has its CatchHandler @ 001059c5 */
CUtlString::CUtlString(local_3c);
/* try { // try from 00105944 to 0010596e has its CatchHandler @ 001059d7 */
netadr_s::SetIP(local_2c,0);
netadr_s::SetPort(local_2c,0);
netadr_s::SetType(local_2c,3);
/* try { // try from 00105979 to 001059a7 has its CatchHandler @ 001059e6 */
CUtlString::operator=(local_3c,param_1);
CUtlString::operator=(local_4c,param_2);
Remote_t::Resolve((Remote_t *)local_4c);
CUtlVector<Remote_t,CUtlMemory<Remote_t,int>>::InsertBefore
((CUtlVector<Remote_t,CUtlMemory<Remote_t,int>> *)this,*(int *)(this + 0xc),
(Remote_t *)local_4c);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_3c);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_4c);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.