CLog::Print
0x001fa010 · 410 bytes · __thiscall
_ZN4CLog5PrintEPKc
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CLog::Print(char const*) */
void __thiscall CLog::Print(CLog *this,char *param_1)
{
int iVar1;
netadr_s *pnVar2;
int iVar3;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
int local_38;
int local_34;
if (((this[8] != (CLog)0x0) && (param_1 != (char *)0x0)) && (*param_1 != '\0')) {
iVar1 = _V_strlen(param_1);
if (0x400 < iVar1) {
DevMsg(1,"CLog::Print: string too long (>1024 bytes).");
return;
}
(**(code **)(_g_pVCR + 0x5c))(&local_48);
V_snprintf(Print(char_const*)::string,0x44c,"L %02i/%02i/%04i - %02i:%02i:%02i: %s",local_38 + 1
,local_3c,local_34 + 0x76c,local_40,local_44,local_48,param_1);
if (*(int *)(sv_logecho._28_4_ + 0x30) != 0) {
ConMsg("%s",Print(char_const*)::string);
}
if (((*(int *)(sv_logfile._28_4_ + 0x30) != 0) && (*(int *)(this + 0x20) != 0)) &&
((**(code **)(*g_pFileSystem + 100))
(g_pFileSystem,*(int *)(this + 0x20),&DAT_002c48a3,Print(char_const*)::string),
*(int *)(sv_logflush._28_4_ + 0x30) != 0)) {
(**(code **)(g_pFileSystem[1] + 0x20))(g_pFileSystem + 1,*(undefined4 *)(this + 0x20));
}
iVar1 = 0;
if (0 < *(int *)(this + 0x18)) {
iVar3 = 0;
do {
iVar3 = iVar3 + 1;
pnVar2 = (netadr_s *)(*(int *)(this + 0xc) + iVar1);
iVar1 = iVar1 + 0xc;
NET_OutOfBandPrintf(1,pnVar2,"%c%s",0x52,Print(char_const*)::string);
} while (iVar3 < *(int *)(this + 0x18));
}
}
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.