This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Metamod Query Cache


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 06-30-2014 , 09:55   Re: Metamod Query Cache
Reply With Quote #11

I've rewrote the extension ( cleaned up the code mostly ). The main thing I added was a RequestMap.
Now each time a A2S_INFO request is received, the IP it's added into a map. If the client sends more than qc_maxrequests per second he no longer receives the A2S_INFO responses in that second ( can be changed to a more severe behaviour if needed ). This could be done even better by peaking at the data just to check the IP and save some time that is used while the buffer is moved, but I have yet to search for some more info about the Valve networking code ( noob here ).

The only builds I made were CSGO,CSS,L4D,L4D2,TF2,SDK2013.

If anyone wants to build it : link

CVars :
- qc_time - A2S_INFO requests timeout in seconds.
- qc_maxrequests - Maximum ammount of A2S_INFO requests per second. ( RequestMap must be enabled for this to work )
- qc_requestmap_enabled - Enable/disable the RequestMap. Will rehook recvfrom ( I wanted to keep it optimized and this is better than checking if the RequestMap is enabled each time recvfrom is called )

Commands :
- qc_requestmap - Prints the RequestMap.
- qc_requestmap_clear - Clears the RequestMap. ( auto @ plugin_un/load / map_load )

How to install :
Quote:
Let's say you want to install it on a Linux CSS Server :
You copy qcache_mm.vdf into addons/metamod
You copy linux/qcache_mm.css/qcache_mm.so into addons/

Same rules apply to other servers.
Edit : Reuploaded new version. Should load now on Linux
Edit2 : Uploaded version 1.0.0.1. ( Added qc_requestmap_enabled and remade qc_requestmap a bit, now it shows the traffic done : total requests in that second and the total overlimits for all-time ). Also did some tests and it seemed pretty ok for low amounts of traffic ( 30 A2S_INFO requests per second ).
Edit3 : Recompiled.
Edit4 : Added SDK2013 version.
Attached Files
File Type: zip qcache_mm.zip (2.68 MB, 2128 views)

Last edited by energie4cute; 07-07-2014 at 11:03.
energie4cute is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:09.


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