CBaseServer::AddTagString
0x0010dec0 · 301 bytes · __thiscall
_ZN11CBaseServer12AddTagStringER10CUtlStringPKc
Decompiled
undefined (3 params)
/* CBaseServer::AddTagString(CUtlString&, char const*) */
void __thiscall CBaseServer::AddTagString(CBaseServer *this,CUtlString *param_1,char *param_2)
{
int iVar1;
char *pcVar2;
CUtlMemory<unsigned_char,int> *this_00;
CUtlVector *extraout_ECX;
int iVar3;
int local_30 [8];
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
iVar1 = _V_strstr(param_2,",");
if (iVar1 != 0) {
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 0010df28 to 0010df5f has its CatchHandler @ 0010dff2 */
BuildTokenList(param_2,(char)local_30,extraout_ECX);
if (0 < local_30[3]) {
iVar1 = 0;
do {
pcVar2 = (char *)CUtlString::Get((CUtlString *)(iVar1 * 0x10 + local_30[0]));
AddTagString(this,param_1,pcVar2);
iVar1 = iVar1 + 1;
} while (iVar1 < local_30[3]);
}
iVar1 = local_30[3] + -1;
iVar3 = iVar1 * 0x10;
if (-1 < iVar1) {
do {
iVar1 = iVar1 + -1;
this_00 = (CUtlMemory<unsigned_char,int> *)(local_30[0] + iVar3);
iVar3 = iVar3 + -0x10;
CUtlMemory<unsigned_char,int>::Purge(this_00);
} while (iVar1 != -1);
}
local_30[3] = 0;
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
return;
}
iVar1 = CUtlString::Length(param_1);
if (iVar1 != 0) {
CUtlString::operator+=(param_1,",");
}
CUtlString::operator+=(param_1,param_2);
}
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.