NET_GetLocalAddress
0x001c4780 · 327 bytes · unknown
_Z19NET_GetLocalAddressv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* NET_GetLocalAddress() */
void NET_GetLocalAddress(void)
{
int iVar1;
char *pcVar2;
int in_GS_OFFSET;
char local_210 [511];
undefined1 local_11;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
netadr_s::Clear((netadr_s *)&net_local_adr);
if (net_noip == '\0') {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((ipname[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(ipname._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(ipname._28_4_ + 0x24);
}
}
iVar1 = _V_strcmp(pcVar2,"localhost");
if (iVar1 == 0) {
gethostname(local_210,0x200);
local_11 = 0;
}
else {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((ipname[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(ipname._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(ipname._28_4_ + 0x24);
}
}
V_strncpy(local_210,pcVar2,0x200);
}
NET_StringToAdr(local_210,(netadr_s *)&net_local_adr);
ConVar::SetValue(0x3ac8c0);
}
else {
Msg("TCP/UDP Disabled.\n");
}
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.