L L4D2node

listip

0x001ef4f0 · 285 bytes · __cdecl

_ZL6listipRK8CCommand

Decompiled

undefined (1 param)

/* listip(CCommand const&) */

void listip(CCommand *param_1)

{
  float fVar1;
  uint uVar2;
  bool bVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar4 = DAT_003b2460;
  if (DAT_003b2460 == 0) {
    ConMsg("IP filter list: empty\n");
    return;
  }
  if (DAT_003b2460 == 1) {
    ConMsg("IP filter list: %i entry\n",1);
  }
  else {
    ConMsg("IP filter list: %i entries\n",DAT_003b2460);
    if (iVar4 < 1) {
      return;
    }
  }
  iVar5 = 0;
  iVar6 = 1;
  do {
    while( true ) {
      fVar1 = *(float *)(g_IPFilters + iVar5 + 0xc);
      uVar2 = *(uint *)(g_IPFilters + iVar5 + 4);
      if (fVar1 == 0.0) break;
      iVar5 = iVar5 + 0x10;
      ConMsg("%i %3i.%3i.%3i.%3i : %.3f min\n",iVar6,uVar2 & 0xff,uVar2 >> 8 & 0xff,
             uVar2 >> 0x10 & 0xff,uVar2 >> 0x18,(double)fVar1);
      bVar3 = iVar4 <= iVar6;
      iVar6 = iVar6 + 1;
      if (bVar3) {
        return;
      }
    }
    iVar5 = iVar5 + 0x10;
    ConMsg("%i %3i.%3i.%3i.%3i : permanent\n",iVar6,uVar2 & 0xff,uVar2 >> 8 & 0xff,
           uVar2 >> 0x10 & 0xff,uVar2 >> 0x18);
    bVar3 = iVar6 < iVar4;
    iVar6 = iVar6 + 1;
  } while (bVar3);
  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)