net_channels
0x001c5030 · 179 bytes · __cdecl
_ZL12net_channelsRK8CCommand
Decompiled
undefined (1 param)
/* net_channels(CCommand const&) */
uint net_channels(CCommand *param_1)
{
int iVar1;
uint uVar2;
uint uVar3;
int iVar4;
bool bVar5;
iVar1 = DAT_003ac4ac;
if (DAT_003ac4ac == 0) {
uVar3 = ConMsg("No active net channels.\n");
return uVar3;
}
uVar3 = ThreadGetCurrentId();
if (uVar3 != DAT_003ac4b4) {
LOCK();
bVar5 = DAT_003ac4b4 != 0;
uVar2 = uVar3;
if (bVar5) {
uVar2 = DAT_003ac4b4;
}
DAT_003ac4b4 = uVar2;
UNLOCK();
if (bVar5) {
CThreadFastMutex::Lock(0x3ac4b4,uVar3);
goto LAB_001c506b;
}
}
DAT_003ac4b8 = DAT_003ac4b8 + 1;
LAB_001c506b:
iVar4 = 0;
if (0 < iVar1) {
do {
/* try { // try from 001c5083 to 001c5087 has its CatchHandler @ 001c50ef */
NET_PrintChannelStatus(*(INetChannel **)(s_NetChannels + iVar4 * 4));
iVar4 = iVar4 + 1;
} while (iVar4 != iVar1);
}
DAT_003ac4b8 = DAT_003ac4b8 - 1;
uVar3 = DAT_003ac4b8;
if (DAT_003ac4b8 == 0) {
LOCK();
UNLOCK();
uVar3 = DAT_003ac4b4;
DAT_003ac4b4 = 0;
}
return uVar3;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.