L L4D2node

CHLTVClientState::ConnectionClosing

0x0016d3f0 · 134 bytes · __thiscall

_ZN16CHLTVClientState17ConnectionClosingEPKc

Decompiled

undefined (2 params)

/* CHLTVClientState::ConnectionClosing(char const*) */

void __thiscall CHLTVClientState::ConnectionClosing(CHLTVClientState *this,char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  
  CBaseClientState::ConnectionClosing((CBaseClientState *)this,param_1);
  if (*(int *)(tv_autoretry._28_4_ + 0x30) != 0) {
    iVar1 = CAddressList::Count((CAddressList *)(this + 0x2c));
    if (0 < iVar1) {
      iVar1 = CAddressList::Get((CAddressList *)(this + 0x2c),0);
      uVar2 = CUtlString::Get((CUtlString *)(iVar1 + 0x10));
      uVar2 = va("tv_relay %s\n",uVar2);
      uVar3 = Cbuf_GetCurrentPlayer();
      Cbuf_AddText(uVar3,uVar2,0);
      return;
    }
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)