I want to make a script that checks the IP address of the clients joining my server and automatically permabanning them if they're American. How do I do this?
Please explain why...
I'm not particularly sure, but I know it's entirely feasible. I was once auto banned from a French server for being from the UK.
Good luck.
[QUOTE=Anotherwall;32222278]Please explain why...[/QUOTE]
I don't like Americans.
Ask Fidel Castro to see if you can borrow his script.
Install: [url]http://www.facepunch.com/threads/969950[/url]
Save the code to autorun/ohmygodwhat.lua
[lua]
require 'geoip'
hook.Add('PlayerConnect',1,function(_,a)
local ip=a:match("^(.*)%:") -- TODO: IPv6
local t=GeoIP.Get(ip)
if t.country_name and t.country_name == "United States" then
RunConsoleCommand("addip",ip)
end
end)
[/lua]
Enjoy DDoS
I also hate Americans. god they can be fat bastards a lot of the time.
[QUOTE='Poesidan [GAG];32223639']I also hate Americans. god they can be fat bastards a lot of the time.[/QUOTE]
I see what you did there...
[QUOTE='Poesidan [GAG];32223639']I also hate Americans. god they can be fat bastards a lot of the time.[/QUOTE]
[img_thumb]http://gyazo.com/5b56ef7a032cede3c795eae74cf8ff0c.png[/img_thumb]
[QUOTE=zzaacckk;32224112][img_thumb]http://gyazo.com/5b56ef7a032cede3c795eae74cf8ff0c.png[/img_thumb][/QUOTE]
This is exactly why we need a "cookie" post rating. I'm pretty sure it didn't need clarifying.
Why do people with 100-300 posts keep buying gold membership?
On-topic: Totaly agree to Slater, having a "cookie" rating would be great.
Seriously on-topic: I don't understand why perma banning them will do anything instead of decreasing your server population by 70%
[QUOTE=Nobody!;32222172]I want to make a script that checks the IP address of the clients joining my server and automatically permabanning them if they're American. How do I do this?[/QUOTE]
You're server is most likely worse then those Dark-RP servers.
I just realized that hes american himself. O.o
How can I ban Estonians?
[QUOTE=Persious;32257483]I just realized that hes american himself. O.o[/QUOTE]
It's a bug with flagdog,the OP of a thread will always be recognized as American.
Oh, never knew that :P
Why the bumps.
Oh God this is hillarius.
Do let us know when you get your server up OP, and post the IP.
I don't even like america either. 90% of us are stupid.
America is full of Fat Lazy people. Damn you McDonalds, Viagra, And Nascar!
couldn't have said it better myself.[QUOTE=Nobody!;32222306]I don't like Americans.[/QUOTE]
Fat? Yes.
We are a very successful country who are raised with the mindset that you should be rewarded for hardwork, and anything you get that way is deserved.
"If you work all week and eat a little too much on the weekend then you earned it."
It's sad, but it's not our fucking job to worry about other country's hunger or disease, but our government forces us to pay taxes and uses this money for charities to help this anyway, and many people in the US contribute more no matter where our tax money goes. Bill Gates gives away shit tons of money to charities. Do you see him donating money to help stop the recession? That's because he knows that there are bigger problems than people not affording to order 2 Big Mac combos a day.
Stupid? Nope. Americans offer higher education(education out of highschool) much more openly than most other countries. If you compare us to many other places, our literacy rate is much higher. Yes, there are horrible idiots in the [B]USA[/B].
America isn't a country by the way. It's 2 continents. North And South America. Technically Canadians and Mexicans are 'American.'
Lazy? Nope.
Many other places wouldn't even consider hiring children while in school. In the USA we tend to try to bend the child labor laws a bit just so that younger people can earn their keep. The spoiled 16 year old girls with fully customized convertibles that dispense ice cream given to them by their parents is seriously rare. People in the US have to work very hard to find a good job, and have to work hard to keep that job.
People worked hard to build this country and this is why we are widely accepting the title of "America" because if you look around, there's not much else here.
Except for Canada, but seriously, it's only Canada...
----------
tl;dr
People from the US that play gmod like morons are fat, lazy, stupid children. Go ahead and ban them, because most people here have better things to do than make a steam account.
[quote]Stupid? Nope. Americans offer higher education(education out of highschool) much more openly than most other countries. [/quote]
$27,967 (public uni) or $40,476(private uni) in USA per year.
£0 in Scotland per year.
up to £9000 in England per year.
Yes your country is very open to higher education..
[QUOTE=Professor Chaos;32283803]$27,967 (public uni) or $40,476(private uni) in USA per year.
£0 in Scotland per year.
up to £9000 in England per year.
Yes your country is very open to higher education..[/QUOTE]
Yes, professor, a couple of other countries completely negates the qualifier "most other countries"
I did not say [U]the most open.[/U]
How did we start speaking about universities again? I mean, this guy asked a question, at least have the decency of giving a complete answer without squabbling between you saying how beautiful america is or what ever your drama queens are attention seeking over.
This thread is incredibly [img]http://www.facepunch.com/fp/ratings/box.png[/img]
-snip-
Ontopic: [url]http://www.facepunch.com/threads/920998-BlockCountry-Block-people-from-certain-countries-from-connecting-to-your-server[/url]!
You can take that script as a template.
Sorry, you need to Log In to post a reply to this thread.