CServerRemoteAccess::LogCommand
0x0020d520 · 222 bytes · __thiscall
_ZN19CServerRemoteAccess10LogCommandEjPKc
Decompiled
undefined (3 params)
/* CServerRemoteAccess::LogCommand(unsigned int, char const*) */
void __thiscall
CServerRemoteAccess::LogCommand(CServerRemoteAccess *this,uint param_1,char *param_2)
{
char cVar1;
undefined4 uVar2;
if (*(int *)(sv_rcon_log._28_4_ + 0x30) != 0) {
if ((param_1 < *(uint *)(this + 0x44)) &&
(*(char *)(*(int *)(this + 0x2c) + 5 + param_1 * 0x1c) != '\0')) {
cVar1 = LoggingSystem_IsChannelEnabled(LOG_ServerLog,0);
if (cVar1 != '\0') {
uVar2 = netadr_s::ToString((netadr_s *)(param_1 * 0x1c + *(int *)(this + 0x2c) + 8),false);
LoggingSystem_Log(LOG_ServerLog,0,"rcon from \"%s\": %s\n",uVar2,param_2);
}
}
else {
cVar1 = LoggingSystem_IsChannelEnabled(LOG_ServerLog,0);
if (cVar1 != '\0') {
LoggingSystem_Log(LOG_ServerLog,0,"rcon from \"unknown\": %s\n",param_2);
return;
}
}
}
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.