AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   STEAM_ID_PENDING Kicker (https://forums.alliedmods.net/showthread.php?t=39479)

showdax 12-17-2005 12:55

STEAM_ID_PENDING Kicker
 
1 Attachment(s)
I quickly made this plugin to handle the apparent new exploit that allows players to join and stay on a server with a pending steamid. A pending steamid means that the server hasn't finished validating the player's steamid. The exploit takes advantage of this and their steamid never validates. This can make banning them more annoying and any scripts that ban solely by steamid will be confused by them.

The plugin works around this by kicking clients that go active (spawn) with a pending steamid. 99.9% of the time a player's steamid will be validated before they spawn.

Here's the only interesting bit of code from the plugin:
Code:

void CServerPluginPending_ClientActive(edict_t *entity, bool bLoadGame)
{
        if (!entity)
                RETURN_META(MRES_IGNORED);

        int userid = g_Engine->GetPlayerUserId(entity);
        if (userid < 1)
                RETURN_META(MRES_IGNORED);

        const char *steamid = g_Engine->GetPlayerNetworkIDString(entity);
        if (!steamid || !Q_stristr(steamid, "PENDING"))
                RETURN_META(MRES_IGNORED);

        /* "kickid " = 7, kick message = 40, \0 = 1, + 1 for int length thing */
        int length = ((int) log10((float) userid)) + 49;
        char *command = (char *) malloc(length);
        Q_snprintf(command, length, "kickid %d Network ID didn't validate. Reconnect.\n", userid);
        g_Engine->ServerCommand(command);
        free(command);

        RETURN_META(MRES_HANDLED);
}

Oh, and it's for SourceMM, of course. Linux binary, Windows binary and source code are in the attached archive. Everything is public domain. The Linux binary does not require libstdc++ whatsoever. Just shove the file in mod/addons/ and run "meta load addons/pending_mm".

Opossum 12-18-2005 07:55

Yeah, I'll install it now :D

tcviper 12-18-2005 09:03

Just installed it on CSS and DODS Win2003 servers with SMM and Mani for SMM. I will let you know the details.

showdax 12-18-2005 12:05

Well it's been working pretty well for me:
Code:

L1216001.log:L 12/17/2005 - 10:48:19: "SS[部队在前进]<537><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 11:12:47: "[myg0t]D0MINATI0N<562><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 13:07:07: "[myg0t]D0MINATI0N<723><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 19:58:36: "=CCCP= .::TMX::.<1213><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 20:30:56: "[myg0t]BaDaZZ<1232><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 22:03:16: "elreeso<1318><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 22:04:01: "elreeso<1319><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/17/2005 - 23:28:02: "[myg0t]OMP<1411><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")
L1216001.log:L 12/18/2005 - 02:03:16: "(1)unnamed<1556><STEAM_ID_PENDING><Unassigned>" disconnected (reason "Kicked by Console : Network ID didn't validate. Reconnect.")


L. Duke 12-20-2005 13:01

We've had some problems on a DOD:S server. Thanks for writing this.

Seems like Valve could have released an update to fix this long before now. :cry:

sniper_strike 12-20-2005 18:29

Quote:

Originally Posted by L. Duke
We've had some problems on a DOD:S server. Thanks for writing this.

Seems like Valve could have released an update to fix this long before now. :cry:

Alfreds on vacation and isnt the the one who handles this sort of thing to do with srcds

L. Duke 12-20-2005 18:49

Quote:

Originally Posted by sniper_strike
Alfreds on vacation and isnt the the one who handles this sort of thing to do with srcds

I didn't say anything about Alfred doing it, I said Valve. :lol:

vamped68 12-21-2005 11:33

hmm,
 
whats this.

08:31:37 L 12/21/2005 - 11:28:18: "Mastertech<158><STEAM_ID_PENDING><>" connected, address "24.7.77.244:27005"
08:31:38 L 12/21/2005 - 11:28:19: "Mastertech<158><STEAM_0:1:5424690><>" STEAM USERID validated
08:31:38 L 12/21/2005 - 11:28:19: "Mastertech<158><STEAM_0:1:5424690><>" disconnected (reason "No Steam logon

showdax 12-21-2005 12:56

Re: hmm,
 
Quote:

Originally Posted by vamped68
whats this.

That has nothing to do with the plugin. Chances are the person probably disconnected shortly after connecting, but the "disconnect" message wasn't sent from his client to the server, so his Steam session timed out.

dejavu 01-05-2006 07:25

STEAM validation rejected
 
i got this message. :shock:


All times are GMT -4. The time now is 06:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.