L L4D2node

SetMasterServerKeyValue

0x0010a3f0 · 234 bytes · __regparm3

_ZL23SetMasterServerKeyValueP16ISteamGameServerP7IConVar

Decompiled

undefined (2 params)

/* SetMasterServerKeyValue(ISteamGameServer*, IConVar*) */

void __regparm3 SetMasterServerKeyValue(ISteamGameServer *param_1,IConVar *param_2)

{
  code *pcVar1;
  char cVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 uVar5;
  int *local_24;
  int local_20;
  
  ConVarRef::ConVarRef((ConVarRef *)&local_24,param_2);
  cVar2 = (**(code **)(*local_24 + 0x18))(local_24,0x20);
  if (cVar2 == '\0') {
    pcVar1 = *(code **)(*(int *)param_1 + 0x50);
    uVar3 = *(undefined4 *)(local_20 + 0x24);
    uVar5 = (**(code **)(*local_24 + 0x10))(local_24);
    (*pcVar1)(param_1,uVar5,uVar3);
  }
  else {
    if (**(char **)(local_20 + 0x24) != '\0') {
      iVar4 = _V_stricmp(*(char **)(local_20 + 0x24),"none");
      if (iVar4 != 0) {
        pcVar1 = *(code **)(*(int *)param_1 + 0x50);
        uVar3 = (**(code **)(*local_24 + 0x10))(local_24);
        (*pcVar1)(param_1,uVar3,"1");
        goto LAB_0010a44d;
      }
    }
    pcVar1 = *(code **)(*(int *)param_1 + 0x50);
    uVar3 = (**(code **)(*local_24 + 0x10))(local_24);
    (*pcVar1)(param_1,uVar3,&DAT_002c3f3c);
  }
LAB_0010a44d:
  iVar4 = Steam3Server();
  if ((*(int *)(iVar4 + 4) != 0) && (0 < *(int *)(iVar4 + 0x98))) {
    CBaseServer::RecalculateTags((CBaseServer *)&sv);
  }
  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)