L L4D2node

Filter_IsUserBanned

0x001f0820 · 183 bytes · __cdecl

_Z19Filter_IsUserBannedRK8USERID_s

Decompiled

undefined (1 param)

/* Filter_IsUserBanned(USERID_s const&) */

bool Filter_IsUserBanned(USERID_s *param_1)

{
  float fVar1;
  int iVar2;
  char cVar3;
  bool bVar4;
  CSteam3Server *this;
  int iVar5;
  USERID_s *pUVar6;
  int iVar7;
  
  iVar2 = *(int *)(sv_filterban._28_4_ + 0x30);
  bVar4 = false;
  if (iVar2 != 0) {
    iVar5 = DAT_003b244c + -1;
    if (-1 < iVar5) {
      iVar7 = iVar5 * 0x18;
      do {
        pUVar6 = (USERID_s *)(g_UserFilters + iVar7);
        fVar1 = *(float *)(pUVar6 + 0x10);
        if ((fVar1 == 0.0) || (realtime < fVar1)) {
          this = (CSteam3Server *)Steam3Server();
          cVar3 = CSteam3Server::CompareUserID(this,param_1,pUVar6);
          if (cVar3 != '\0') {
            return iVar2 == 1;
          }
        }
        else {
          CUtlVector<userfilter_t,CUtlMemory<userfilter_t,int>>::ShiftElementsLeft
                    ((CUtlVector<userfilter_t,CUtlMemory<userfilter_t,int>> *)&g_UserFilters,iVar5,1
                    );
          DAT_003b244c = DAT_003b244c + -1;
        }
        iVar5 = iVar5 + -1;
        iVar7 = iVar7 + -0x18;
      } while (iVar5 != -1);
    }
    bVar4 = iVar2 != 1;
  }
  return bVar4;
}

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)