L L4D2node

ValidateMOTDFilename

0x006c5f10 · 111 bytes · __cdecl

_ZL20ValidateMOTDFilenameP7IConVarPKcf

Decompiled

undefined (3 params)

/* ValidateMOTDFilename(IConVar*, char const*, float) */

void ValidateMOTDFilename(IConVar *param_1,char *param_2,float param_3)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  undefined4 *local_14;
  int local_10;
  
  ConVarRef::ConVarRef((ConVarRef *)&local_14,param_1);
  pcVar1 = *(char **)(local_10 + 0x24);
  if ((((pcVar1 == (char *)0x0) || (iVar3 = _V_strlen(pcVar1), iVar3 < 1)) ||
      (cVar2 = V_IsAbsolutePath(pcVar1), cVar2 != '\0')) ||
     (iVar3 = _V_strstr(pcVar1,".."), iVar3 != 0)) {
    (**(code **)*local_14)(local_14,*(undefined4 *)(local_10 + 0x20));
  }
  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)