AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [L4D2] ConnectHook (https://forums.alliedmods.net/showthread.php?t=275997)

spumer 12-12-2015 08:59

[L4D2] ConnectHook
 
2 Attachment(s)
This extension provides a OnClientPreConnect forward (similar to CBaseServer's, and Connect).

Unlike the Connect extension this version supports Left 4 Dead 2 game, but no SteamID validation (engine restrictions).

Unlike the CBaseServer extension this version provides more clear interface to reject clients.

PHP Code:

/**
 * @brief Called very early in the client connect process
 *
 * @param name          Client's name.
 * @param password      Connection password (or the most recently used one).
 * @param ip            Client's IP address.
 * @param steamID       Client's SteamId.  (This is before authentication so it is not guaranteed.)
 * @param rejectReason  Client's connection reject reason. Will be used only if returned action is Plugin_Handled or above.
 */
forward Action:OnClientPreConnect(const String:name[], const String:password[], const String:ip[], const String:steamID[], String:rejectReason[255]); 

You also can use standard "presets" of kick reasons. For example, restrict any connections to the server:

PHP Code:

public Action:OnClientPreConnect(const String:name[], const String:password[], const String:ip[], const String:steamID[], String:rejectReason[255])
{
        
PrintToServer("Name=%s, password=%s, IP=%s, steamID=%s"namepasswordipsteamID);
        
FormatEx(rejectReasonsizeof(rejectReason), "%s""#Valve_Reject_Server_Full");
        return 
Plugin_Stop;


Full example you can see in scripting/test_onclientpreconnect.sp

yurikon 01-18-2016 04:29

Re: [L4D2] ConnectHook
 
can you please make a windows Version

spumer 01-28-2016 14:08

Re: [L4D2] ConnectHook
 
2 Attachment(s)
Windows version in attachment. I have no enviroment for test this. I need report from someone.

sheo 03-04-2016 05:23

Re: [L4D2] ConnectHook
 
Great! Thank you!

yurikon 03-05-2016 10:02

Re: [L4D2] ConnectHook
 
Quote:

Originally Posted by spumer (Post 2387664)
Windows version in attachment. I have no enviroment for test this. I need report from someone.

L 03/05/2016 - 22:56:44: [ConnectHook] Sigscan for CBaseServer_ConnectClient failed - Disabling detour to prevent crashes
L 03/05/2016 - 22:56:44: [ConnectHook] Failed to setup ConnectClient detour
L 03/05/2016 - 22:56:58: Error log file session closed.

spumer 03-06-2016 10:17

Re: [L4D2] ConnectHook
 
Thanks! Windows gamedata in previous post updated!

Who already download, you can manually strip old gamedata:

OLD:
PHP Code:

"windows"    "\x55\x8B\xEC\x83\xEC\x10\x56\x68\x8C\xAB\x37\x10" 

NEW:
PHP Code:

"windows"    "\x55\x8B\xEC\x83\xEC\x10\x56\x68" 


yurikon 03-07-2016 20:29

Re: [L4D2] ConnectHook
 
it works,Thank you.

spumer 09-28-2016 01:24

Re: [L4D2] ConnectHook
 
Quote:

I changed the admin autentication by ip and didn't workout either.

I compiled the test_onclientpreconnect.sp file to a plugin, put it in plugins folder of server and still not working.

Still receiving "server is full" message.
If you permanently received "server is full" message, then extension works properly. This is logic of test plugin - restrict any connection.

You can write your own plugin with callback OnClientPreConnect forward and apply any filters. Test plugin just explain how does it works.

Please post command output: "sm exts list"

Spirit_12 09-28-2016 18:23

Re: [L4D2] ConnectHook
 
I just don't see any use for this extension. Can't we already use l4dtoolz or Downtown to extend server slots? Am I missing something here?

cravenge 09-28-2016 21:41

Re: [L4D2] ConnectHook
 
Quote:

Originally Posted by Spirit_12 (Post 2457760)
I just don't see any use for this extension. Can't we already use l4dtoolz or Downtown to extend server slots? Am I missing something here?

Spirit, this extension checks connected players' SteamIDs. Also helps the servers prevent them from impersonating admins if they have the same as or maybe stolen theirs. Really useful since I'm still using it now and lots of other servers are using it too.


All times are GMT -4. The time now is 08:05.

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