AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Country kicker (https://forums.alliedmods.net/showthread.php?t=11412)

EKS 03-18-2005 19:23

Country kicker
 
1 Attachment(s)
This plugin is used if you only want ppl from spesfic countrys on your server, or wanna prevent ppl from a spesfic countrys from entering


Modules required: geoip

Credits:
Ops in #AMXmod @ Quakenet for alot of help ( + AssKicker & CheesyPeteza )
xeroblood Explode string func

Setting up plugin:
sv_country
1 Only allow ppl from this country
2 Everyone exect from this country

sv_country_name use commas to seperate country names
like:
sv_country_name "NOR,DEN"

Country list: http://www.statoids.com/wab.html <- Use A-3

Changelog
1.0.0( 18.12.2004 )
- First public release[/b]

[Godmin] Gonzo 03-19-2005 13:02

Please post a list of Country-Codes or a link to them, thanks

EKS 03-19-2005 14:18

http://www.statoids.com/wab.html
First hit on google :)

/me points gonzo to http://tinyurl.com/3s3y4

[Godmin] Gonzo 03-20-2005 02:48

Thank you. My google trys where not sucessfull

Puntje 03-26-2005 14:55

Cheers!

So i can make dutch only servers now, if wanted..
thanks a lot !

The-56k-LaggA 03-27-2005 04:16

Juhuuuu Endlich die nervenden Noob-Polen von den deutschen 1.5-Servern schmeißen :D
und das autom.!!! *g

sry my english is to bad to say what I feel 4 this plugin in this language :D

I love iT

Proach 03-27-2005 06:09

very cool plugin
thx alot :P

sonsen 03-28-2005 15:33

argh! it doesn't work for me.

do i have to use Ger, de or deu for Germany? i always get the message "only ppl. from xxx are allowed" - but i am from xxx (germany)!

pls. help.

thx

EKS 03-28-2005 17:54

first post :=)

[Godmin] Gonzo 03-28-2005 17:57

Quote:

Originally Posted by EKS
first post :=)

Well, tell him which of the codes he should use:

A-2 A-3 Num ITU FIPS IOC DS WMO MARC

;)

EKS 03-28-2005 18:12

A-3 offcourse :)

sonsen 03-29-2005 00:40

thx!

[WbOF]LuZiFeR 04-02-2005 13:46

Is there a possibilty to show the whole country-name ? Or is it only 3 letters ever ? :)

Proach 04-02-2005 14:40

isnt it easier with only 3 letters?

[WbOF]LuZiFeR 04-02-2005 18:20

Hmmm....No...Because today i have 2 probs...

A user has connected who is domiciled at SVN....hmmm....and we all work on the riddle, where he's coming from....

Sure....We can look at the list of Country-Codes, but this is very circumstantial....

The 2. prob is, that AOL-Users are shown as USA-Users everytime.....I thing, i must edit the code to unmask this users as lamers... :)

nightscreem 04-02-2005 20:50

isn't this racisme

Proach 04-03-2005 03:19

Quote:

Originally Posted by [WbOF
LuZiFeR]Hmmm....No...Because today i have 2 probs...

A user has connected who is domiciled at SVN....hmmm....and we all work on the riddle, where he's coming from....

Sure....We can look at the list of Country-Codes, but this is very circumstantial....

The 2. prob is, that AOL-Users are shown as USA-Users everytime.....I thing, i must edit the code to unmask this users as lamers... :)

well for your first problem.. if you only want to let in people from one country
then all you need is the right code for that country right?
so you won't need to know any other lang codes

[WbOF]LuZiFeR 04-03-2005 06:05

Sure....If i use it like it is...

But i use it a little bit drifferent :)

I show, where the players are coming from and don't kick them...

Maybe i ask this question in another Thread, because it is not a problem of country_kicker only a question that has to do with the geoip... :)

[WbOF]LuZiFeR 04-11-2005 12:39

A little Info for german Users:

German AOL-Users are shown as connecting from USA....

I've put the IPs (172.xxx.xxx.xxx) from them to the function for Local-IPs:

Code:

stock IsLocalIp(IP[32])
{
        new tIP[32]
       
        copy(tIP,3,IP)
        if(equal(tIP,"10.") || equal(tIP,"127") || equal(tIP,"172"))
                return 1
        copy(tIP,7,IP)
        if(equal(tIP,"192.168"))
                return 1

        return 0
}

It's only a solution for my needs, because they won't be checked, but maybe someone needs it too..... :)

Better way would be to check and handle them like germans... :)

macleote 05-09-2005 18:24

Quote:

Originally Posted by [WbOF
LuZiFeR]A little Info for german Users:

German AOL-Users are shown as connecting from USA....

I've put the IPs (172.xxx.xxx.xxx) from them to the function for Local-IPs:

Code:

stock IsLocalIp(IP[32])
{
        new tIP[32]
       
        copy(tIP,3,IP)
        if(equal(tIP,"10.") || equal(tIP,"127") || equal(tIP,"172"))
                return 1
        copy(tIP,7,IP)
        if(equal(tIP,"192.168"))
                return 1

        return 0
}

It's only a solution for my needs, because they won't be checked, but maybe someone needs it too..... :)

Better way would be to check and handle them like germans... :)

It is the same for french but your tips doesnt work for me :/

[WbOF]LuZiFeR 05-10-2005 03:47

Yes...You are right....

I have changed it to this:

Code:
stock IsLocalIp(IP[32]) {         new tIP[32]         copy(tIP,3,IP)         if(equal(tIP,"10.") || equal(tIP,"127"))                 return 1         copy(tIP,7,IP)         if(equal(tIP,"192.168"))                 return 1         copy(tIP,3,IP)         if(equal(tIP,"172"))                 return 1         return 0 }

And now it works... :)

(Remember, it will handles the AOL-Users like an error or local-user ! If you'll use it as a kicker, it doesn't work...)

In the next few days i will show 'my' plugin in an extra thread.. :)

macleote 05-10-2005 17:45

it seems to work fines!!
Good job [WbOF]LuZiFeR

[]D [] []v[] []D 07-28-2005 22:57

this plugin is sick as hell i luv it

TheTier 11-10-2005 12:57

I have wrote this in my amxx.cfg

sv_country 1
sv_country_name "DEU,AUT,CHE"

but it does not work ..

The Server kick them again.

Whats wrong ?

DruM 11-10-2005 17:34

Quote:

Originally Posted by TheTier
I have wrote this in my amxx.cfg

sv_country 1
sv_country_name "DEU,AUT,CHE"

but it does not work ..

The Server kick them again.

Whats wrong ?

server.cfg

Mulan 11-13-2005 03:46

Quote:

Originally Posted by DruM
Quote:

Originally Posted by TheTier
I have wrote this in my amxx.cfg

sv_country 1
sv_country_name "DEU,AUT,CHE"

but it does not work ..

The Server kick them again.

Whats wrong ?

server.cfg

LOL its never mind
amxx.cfg or server.cfg... THIS PLUGIN IS BUGGY and dosnt work

Cjohn 11-21-2005 01:02

broken link
 
Broken link...

actually i would like this, could someone please fix link??? or point me to link... thank you... i always get european ppl on my server and they always have 200+ pings and plus they sit and speak difer lang... very annoying lol

EKS 11-21-2005 05:23

link is not broken, online compiler was/is broke

Mulan 11-26-2005 19:40

plz make a fixed version of this plugin. dosnt work

EKS 11-26-2005 20:31

no, See i cant fix something that i dont know is broke. Pointless posts like yours just annoy me

feffe 03-11-2006 18:43

Re: Country kicker
 
Quote:

Originally Posted by EKS
This plugin is used if you only want ppl from spesfic countrys on your server, or wanna prevent ppl from a spesfic countrys from entering


Modules required: geoip

Credits:
Ops in #AMXmod @ Quakenet for alot of help ( + AssKicker & CheesyPeteza )
xeroblood Explode string func

Setting up plugin:
sv_country
1 Only allow ppl from this country
2 Everyone exect from this country

sv_country_name use commas to seperate country names
like:
sv_country_name "NOR,DEN"

Country list: http://www.statoids.com/wab.html <- Use A-3

Changelog
1.0.0( 18.12.2004 )
- First public release[/b]


DEN is not in the A-3 list. im from denmark and it should be DNK??

i always get the errror called:

nly ppl from dnk nor are allowed....

should i write somethings else in the server.cfg?


i found that the cvar, dont work. you have to change witch countrys in the .sma file... strange but true

sirdrinkalot 03-15-2006 10:31

Use as a country kicker, not banner...
 
Is there any way to make this kick instead of not allow at all?

EKS 03-15-2006 13:45

Re: Use as a country kicker, not banner...
 
Quote:

Originally Posted by sirdrinkalot
Is there any way to make this kick instead of not allow at all?

that makes not sense

this does kick the players that does not come from the correct nation

6pack 03-15-2006 13:53

Ok I have to ask, why do you want to kick people from a certain country?

feffe 03-17-2006 15:00

Quote:

Originally Posted by 6pack
Ok I have to ask, why do you want to kick people from a certain country?

All german people cheats :D

i hate whem peole woth low ping is joining the server and talk ind their own language :(

sirdrinkalot 03-17-2006 16:24

Sorry, I was a little vague. I was drunk, once again - anyway, what I mean is - I want to allow ALL people from ALL countries, but want to be able to, at my will, Kick all the people from a certain country with a command like "/amx_countkick ***" or something like that.

SubStream 03-17-2006 22:39

Edit: Plugin works flawlessly. Great idea.

Puntje 03-31-2006 09:50

Lots of germans on my server connect from dialin-t.net... Amxbans for instance puts an american flag behind their nick. What country exactly should i put 'm in then? America like amxbans says?

Also, im trying to keep out all the germans cause of the fact of 'm not reading my motd, which is pretty clear about the language that has to be spoken there.
Im getting however kicked everytime im trying to join, even when i changed sv_country...
Quote:

sv_country 2
"sv_country" is "2"
L 03/31/2006 - 16:55:20: World triggered "Round_Start"
L 03/31/2006 - 16:57:13: "ex-Rawh^<2><STEAM_ID_PENDING><>" connected, address "130.89.***.***:27005"
L 03/31/2006 - 16:57:13: Kick: "ex-Rawh^<2><STEAM_ID_PENDING><>" was kicked by "Console" (message "Only ppl from DEU are allowed")
Dropped ex-Rawh^ from server
Reason: Kicked :Only ppl from DEU are allowed
sv_country
"sv_country" is "2"
Quote:

sv_country 1
sv_country
"sv_country" is "1"
130.89.162.19:27005:reconnect
L 03/31/2006 - 16:57:44: "ex-Rawh^<3><STEAM_ID_PENDING><>" connected, address "130.89.***.***:27005"
L 03/31/2006 - 16:57:44: Kick: "ex-Rawh^<3><STEAM_ID_PENDING><>" was kicked by "Console" (message "Only ppl from DEU are allowed")
Dropped ex-Rawh^ from server
Reason: Kicked :Only ppl from DEU are allowed
I've got the following inside my server.cfg:
Quote:

sv_country 1
sv_country_name "DEU"
I've also got GeoIP running (because of amxbans).

here's a list of meta:
Quote:

meta list
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.60 ini ANY ANY
[ 2] SBSRV RUN - sbsrv_mm_i386.so v2.4 ini Start Never
[ 3] STATSME RUN - statsme_mm_i386. v2.8.3 ini Chlvl Chlvl
[ 4] Fun RUN - fun_amxx_i386.so v1.60 pl1 ANY ANY
[ 5] Engine RUN - engine_amxx_i386 v1.60 pl1 ANY ANY
[ 6] MySQL RUN - mysql_amxx_i386. v1.60 pl1 ANY ANY
[ 7] GeoIP RUN - geoip_amxx_i386. v1.60 pl1 ANY ANY
[ 8] CStrike RUN - cstrike_amxx_i38 v1.60 pl1 ANY ANY
8 plugins, 8 running
And list of amxx:
Quote:

amxx list
Currently loaded plugins:
name version author file status
[ 1] Admin Base (AmxBa 1.60 AMXX Dev Team admin_sql.amxx running
[ 2] AMXBans 4.3 YoMama/Lux & lan amxbans.amxx running
[ 3] Admin Commands 1.60 AMXX Dev Team admincmd.amxx running
[ 4] Admin Help 1.60 AMXX Dev Team adminhelp.amxx running
[ 5] Slots Reservation 1.60 AMXX Dev Team adminslots.amxx running
[ 6] Multi-Lingual Sys 1.60 AMXX Dev Team multilingual.am running
[ 7] Menus Front-End 1.60 AMXX Dev Team menufront.amxx running
[ 8] Commands Menu 1.60 AMXX Dev Team cmdmenu.amxx running
[ 9] Players Menu 1.60 AMXX Dev Team plmenu.amxx running
[ 10] Maps Menu 1.60 AMXX Dev Team mapsmenu.amxx running
[ 11] Admin Chat 1.60 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.60 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.60 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.60 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.60 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.60 AMXX Dev Team nextmap.amxx running
[ 17] TimeLeft 1.60 AMXX Dev Team timeleft.amxx running
[ 18] Pause Plugins 1.60 AMXX Dev Team pausecfg.amxx running
[ 19] Stats Configurati 1.60 AMXX Dev Team statscfg.amxx running
[ 20] Restrict Weapons 1.60 AMXX Dev Team restmenu.amxx running
[ 21] Awp2Scout 0.2 [-3LH-]Geezus awp2scout.amxx running
[ 22] say /motd 1.1 Pa1n say_motd.amxx running
[ 23] High Ping Kicker 1.2.0 DynAstY hpk.amxx running
[ 24] Spec Kick 1.0 foo.bar spec_kick.amxx running
[ 25] Admin Spectator E 1.0 KoST admin_spec_esp. running
[ 26] AdminListen 2.3x /dev/ urandom adminlisten.amx running
[ 27] ATAC 2.5.5.0 T(+)rget/f117bom amxx_atac.2.5.5 running
[ 28] ATAC Config 1.1.06 f117bomb & T(+)r amxx_atac_cfg.a running
[ 29] Admin Gag 1.8.3 EKS admin_gag.amxx running
[ 30] Country kicker 1.0.0 EKS country_kicker. running
30 plugins, 30 running
Love the amx_gag btw :P

Any ideas on what im doing wrong or any questions?

Also did a small edit to the file regarding local ip addresses.
Replaced:
Code:
stock IsLocalIp(IP[32]) {     new tIP[32]         copy(tIP,3,IP)     if(equal(tIP,"10.") || equal(tIP,"127"))         return 1     copy(tIP,7,IP)     if(equal(tIP,"192.168"))         return 1     return 0 }
With:
Code:
stock IsLocalIp(IP[32]) {     new tIP[32]         copy(tIP,3,IP)     if(equal(tIP,"10.") || equal(tIP,"127") || equal(tIP,"130"))         return 1     copy(tIP,7,IP)     if(equal(tIP,"192.168"))         return 1     return 0

feffe 05-26-2006 17:37

I dont think this plugin is stable....

i got my sv_country = 1
sv_country_name = NOR,DNK

If i change it to NOR,DNK,SWE

it still kicks all the swedish people.

If i change the .sma

register_cvar("sv_country_name","NOR,DEN") <- This Linie... (DEN is not the right code to Denmark... error nr 2, but anyway..)

i change it to

register_cvar("sv_country_name","NOR,DNK,SWE" )

recompile and then it works.

How could that be???


question 2.

Is it possible to ad an IP of a user, who can connect, no matter what country it is from...?

EKS 05-26-2006 19:08

I guess your config file gets executed to soon, so the plugin overwrites it.

Also no you cannot add a ip thats "ignored" without editing the code


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

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