L L4D2node

CBaseServer::CheckPassword

0x00107b90 · 156 bytes · __cdecl

_ZN11CBaseServer13CheckPasswordER8netadr_sPKcS3_

Decompiled

undefined (3 params)

/* CBaseServer::CheckPassword(netadr_s&, char const*, char const*) */

bool CBaseServer::CheckPassword(netadr_s *param_1,char *param_2,char *param_3)

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if ((*(int *)(param_1 + 0x170) != 0 || *(int *)(param_1 + 0x16c) != 0) ||
     (pcVar2 = (char *)(**(code **)(*(int *)param_1 + 0x74))(param_1), pcVar2 == (char *)0x0)) {
    return true;
  }
  cVar1 = netadr_s::IsLocalhost((netadr_s *)param_2);
  if ((cVar1 == '\0') && (cVar1 = netadr_s::IsLoopback((netadr_s *)param_2), cVar1 == '\0')) {
    iVar3 = _V_strlen(pcVar2);
    iVar4 = _V_strlen(param_3);
    if (iVar3 != iVar4) {
      return false;
    }
    iVar3 = V_strncmp(param_3,pcVar2,iVar3);
    return iVar3 == 0;
  }
  return true;
}

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)