Whitelist/Blacklist specific countries

h1web

VIP
Joined
Sep 2, 2015
Messages
206
Reaction score
134
Points
131
If you have a Sinusbot which connects with the Same IP as the Server runs (localhost, 127.0.0.1) it kicks the Bot "Your Country is not on the Whitelist, or if Blacklist, it gets kicked as well because theres no Country detected."

Can we fix this, so the Bot doesnt gets kicked, if he's from "No Country" ?

Thanks! I Love this script.
 

Najsr

Moderator
TeamSpeak Developer
Joined
Apr 23, 2016
Messages
483
Reaction score
249
Points
167
If you have a Sinusbot which connects with the Same IP as the Server runs (localhost, 127.0.0.1) it kicks the Bot "Your Country is not on the Whitelist, or if Blacklist, it gets kicked as well because theres no Country detected."

Can we fix this, so the Bot doesnt gets kicked, if he's from "No Country" ?

Thanks! I Love this script.
If you know the format of the country parameter when client has no country you can simply add it to the blacklist array.
 

XRV-Webix

Member
Joined
May 2, 2016
Messages
111
Reaction score
55
Points
64
If you know the format of the country parameter when client has no country you can simply add it to the blacklist array.
Actually the country parameter for localhost is empty. Something that the script can't accept or it will ban everything. So, it's impossible to allow localhost on script.
This script is useless like i said on my previous post.
It's easyer, better, smoother, faster and with better performance to use iptables (or any other firewall) to block (or allow) the unwanted countries.
Personal note: You guys are so stupid to build up complex scripts to do tasks that can be easyer done with other softwares.
 

Celso

Well-Known Member
Joined
Oct 1, 2017
Messages
142
Reaction score
47
Points
119
how to change to the script also ignore UID in the Whitelist
 

kalle

high minded
Contributor
Joined
Oct 28, 2015
Messages
411
Reaction score
253
Points
178
how to change to the script also ignore UID in the Whitelist
Create new array with wl values, and in if check add new function with !in_array of connected user, if its not in wl array do ban/ kick.
PHP:
// whitelist of uids
$wl = array("aaaaaaaaa", "bbbbbbbbb");

//check connecting uid
if(... !in_array($wl)){
       // do something
}
 
Top