Query client's ip, and banning clients

Started by Sno, March 12, 2012, 04:44:52 AM

Previous topic - Next topic

Sno

Is there a way to return a client's ip, and/or add a ban? Can't find any methods for that in  JTS3ServerQuery

Stefan1200

#1
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.

Sno

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.

Stefan1200

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.