CSteam3Server::NotifyClientConnect
0x00211c20 · 645 bytes · __thiscall
_ZN13CSteam3Server19NotifyClientConnectEP11CBaseClientjR8netadr_sPKvj
Decompiled
undefined (6 params)
/* CSteam3Server::NotifyClientConnect(CBaseClient*, unsigned int, netadr_s&, void const*, unsigned
int) */
undefined4 __thiscall
CSteam3Server::NotifyClientConnect
(CSteam3Server *this,CBaseClient *param_1,uint param_2,netadr_s *param_3,void *param_4,
uint param_5)
{
char cVar1;
undefined4 uVar2;
undefined4 uVar3;
int iVar4;
undefined4 *puVar5;
int iVar6;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
int local_54 [3];
int local_48;
byte local_3f;
int local_34;
byte local_20;
if ((*(int *)(this + 4) == 0) || (*(int *)(this + 0x98) < 1)) {
return 1;
}
if ((param_1 != (CBaseClient *)0x0) &&
(uVar2 = (**(code **)(*(int *)param_1 + 0x78))(param_1), (char)uVar2 == '\0')) {
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,param_4,param_5,8);
if ((local_3f & 1) == 0) {
cVar1 = CUtlBuffer::CheckGet((CUtlBuffer *)local_54,8);
if (cVar1 == '\0') {
local_74 = 0;
local_70 = 0;
}
else {
if ((local_20 & 1) == 0) {
puVar5 = (undefined4 *)(local_54[0] + (local_48 - local_34));
local_74 = *puVar5;
local_70 = puVar5[1];
}
else {
puVar5 = (undefined4 *)((local_48 - local_34) + local_54[0]);
if (puVar5 == (undefined4 *)0x0) {
puVar5 = &local_6c;
}
local_64 = local_6c;
local_60 = local_68;
iVar6 = 0;
do {
iVar4 = iVar6 + 1;
*(undefined1 *)((int)&local_64 + iVar6) = *(undefined1 *)((int)puVar5 + (7 - iVar6));
iVar6 = iVar4;
} while (iVar4 != 8);
_V_memcpy(&local_6c,&local_64,8);
local_74 = local_6c;
local_70 = local_68;
}
local_48 = local_48 + 8;
}
}
else {
local_6c = 0;
local_68 = 0;
/* try { // try from 00211cb0 to 00211eb5 has its CatchHandler @ 00211ec8 */
CUtlBuffer::Scanf((CUtlBuffer *)local_54,"%I64d",&local_6c);
local_74 = local_6c;
local_70 = local_68;
}
local_5c = local_74;
local_58 = local_70;
uVar3 = (**(code **)(**(int **)(this + 4) + 0x68))
(*(int **)(this + 4),(int)param_4 + 8,param_5 - 8,local_74,local_70);
switch(uVar3) {
default:
CBaseClient::SetSteamID(param_1,(CSteamID *)&local_5c);
SendUpdatedServerDetails(this);
uVar2 = 1;
break;
case 1:
Msg("S3: Client connected with invalid ticket: UserID: %x\n",param_2);
break;
case 2:
Msg("S3: Duplicate client connection: UserID: %x SteamID %llx\n",param_2,local_5c,local_58);
break;
case 3:
Msg("S3: Client connected with invalid ticket ( old version ): UserID: %x\n",param_2);
break;
case 4:
Msg("S3: Client connected with ticket for the wrong game: UserID: %x\n",param_2);
break;
case 5:
Msg("S3: Client connected with expired ticket: UserID: %x\n",param_2);
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
return uVar2;
}
return 0;
}
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.