Stefan1200's Forum

English => General Discussions => Topic started by: Sno on March 12, 2012, 04:44:52 AM

Title: Query client's ip, and banning clients
Post by: Sno on March 12, 2012, 04:44:52 AM
Is there a way to return a client's ip, and/or add a ban? Can't find any methods for that in  JTS3ServerQuery
Title: Re: Query client's ip, and banning clients
Post by: Stefan1200 on March 13, 2012, 09:05:30 AM
Quote from: ymangolds on March 12, 2012, 04:44:52 AM
Is there a way to return a client's ip, and/or add a ban? Can't find any methods for that in  JTS3ServerQuery

Use the getInfo() method with the property INFOMODE_CLIENTINFO and the client id. The returning hashmap contains one entry with the client ip.
Title: Re: Query client's ip, and banning clients
Post by: Sno on March 15, 2012, 07:36:09 PM
cool thanks. What about banning? Reason for wanting an ip was to be able to set a ban to it to prevent them from just being able to change thier name and come back in.
Title: Re: Query client's ip, and banning clients
Post by: Stefan1200 on March 15, 2012, 09:05:57 PM
Currently there is no ready to use method to ban a client. But you can use the method doCommand(String command) to send a server query command to ban a client.