L L4D2node

CPhoneHome::Message

0x00182b00 · 182 bytes · __thiscall

_ZN10CPhoneHome7MessageEhPKc

Decompiled

undefined (3 params)

/* CPhoneHome::Message(unsigned char, char const*) */

void __thiscall CPhoneHome::Message(CPhoneHome *this,uchar param_1,char *param_2)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  
  if ((this[4] != (CPhoneHome)0x0) && (*(int *)(this + 0x3c) != 0)) {
    if (param_1 == '\x03') {
      if (this[0x34] != (CPhoneHome)0x0) {
        return;
      }
      this[0x34] = (CPhoneHome)0x1;
    }
    else {
      if (param_1 != '\x04') {
        if (param_1 == '\x01') {
          cVar1 = RequestSessionId(this,(uint *)(this + 0x38));
          if (cVar1 != '\0') {
            return;
          }
          Error();
          return;
        }
        goto LAB_00182b2d;
      }
      if (this[0x34] == (CPhoneHome)0x0) {
        return;
      }
      this[0x34] = (CPhoneHome)0x0;
    }
    piVar2 = (int *)CommandLine_Tier0();
    iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2,"-makereslists");
    if (iVar3 == 0) {
LAB_00182b2d:
      SendSessionMessage(this,param_1,param_2);
      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)