Raised This Month: $51 Target: $400
 12% 

[Solved][TF2] Country filter with block download?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Research
SourceMod Donor
Join Date: Nov 2011
Old 11-23-2014 , 11:13   [Solved][TF2] Country filter with block download?
Reply With Quote #1

my hosting company don't want give traffic for foreigns(foreign: 15gb in one month)
so I need plugin 'when foreign player try connect in my server, block download custom files and block connect'
if it already release somewhere, tell me where it is. thanks

Last edited by Research; 11-25-2014 at 20:33. Reason: Solved. Thanks for reply
Research is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-23-2014 , 16:28   Re: [TF2] Country filter with block download?
Reply With Quote #2

Change providers.
http://www.nfoservers.com/webhosting.php#differences
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 11-24-2014 , 19:36   Re: [TF2] Country filter with block download?
Reply With Quote #3

The Nazis are evolving and moving to TF2!.... But I think it would go something like this
PHP Code:
#include <sourcemod>
#include <geoip>
public bool:OnClientConnect(clientString:rejectmsg[], length){
    new 
String:country[4], String:IP[42];
    
GetClientIP(clientIPsizeof(IP));
    
GeoipCode3(IPcountry);
    if(!
StrEqual(country"USA"false)){//If they're not from USA. (CAN BE REPLACED WITH ANY 3 LETTER ABREVIATION
        
Format(rejectmsglength"Connections from your country are not allowed.");
        return 
false;
    }
    return 
true;


Last edited by thecount; 11-24-2014 at 19:37.
thecount is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-25-2014 , 06:00   Re: [TF2] Country filter with block download?
Reply With Quote #4

Country Filter 2nd Edition
and don't use admin immunity, update geoip.dat
Bacardi is offline
Research
SourceMod Donor
Join Date: Nov 2011
Old 11-25-2014 , 20:31   Re: [TF2] Country filter with block download?
Reply With Quote #5

Thanks for reply everyone. it would really help.
Research is offline
Reply



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 17:34.


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