Closed SmoxTV closed 7 years ago
There is no such thing as a blacklist. You can do register an onClientJoin
listener to achieve this, though. Get a string representing the client's country by calling event.getClientCountry
. (Note that this information is not guaranteed to accurate.) If that string is not what you expect it to be, kick the client.
Off topic real quick: Installing a geo blocker is a pretty shitty thing to do. Please do consider other alternatives.
I assume you mean that you want to implement a sort-of permissions system for when a client types a "command" into the chat? Like "!help"?
In that case, I'd suggest you just use client.isInServerGroup(someGroupIdHere)
to check if a client is in one of the groups who you want to allow that "command".
also for example
IPAdress xxx.xxx.xxx.xxx --> search the provider --> "Ovh SaS 4636" --> banned
thanks
What kind of "provider"?
And what is Ovh SaS 4636
? Just a name? A name for what?
The Server/Inet Provider i use this for the bans
Example: "The Hoster "blubbb" is not allowed."
Huh, interesting.
You can't do such lookups directly with our API or with TeamSpeak. You can only get the client's IP by calling ClientInfo client = api.getClientInfo(e.getClientId())
, followed by client.getIP()
.
I really can't help you with doing those provider lookups. I honestly don't even know how you'd get that kind of information.
He means the Hostname of an IP Adress
You can get the Hostname like this;
InetAddress addr = InetAddress.getByName(client.getIp);
String host = addr.getHostName();
System.out.println(host);
Then check it etc.
And Make Sure to Not Block Home ISP's like Vodafone , Kabel Deutschland , KabelBW , Unitymedia , 1&1 , Telekom (Dip...) and other one's Verizon , Google Fiber i live in Germany so i dont know ISP's in other Countrys
Hi Guys, I need your help! I dont know much about JavaDoc, but I want to know something
Thank's for help