Can now show client and server versions.
This commit is contained in:
@ -92,6 +92,8 @@ public class Server implements Runnable {
|
||||
if(input.equals("/quit")) {
|
||||
clients.get(findClient(id)).send("/quit");
|
||||
remove(id);
|
||||
} else if(input.equals("/serverVersion")) {
|
||||
clients.get(findClient(id)).send(version);
|
||||
} else if(input.equals("/list")) {
|
||||
int pos = findClient(id);
|
||||
for(int i = 0; i < clients.size(); i++) {
|
||||
|
@ -59,6 +59,8 @@ public class ServerThread extends Thread {
|
||||
" - /myUserName -- Returns your username.\n" +
|
||||
" - /pm [id] [msg] -- Sends a message to only one of the clients.\n" +
|
||||
" - /setUserName [newusername] -- Change your username.\n" +
|
||||
" - /clientVersion -- Returns the version of the client.\n" +
|
||||
" - /serverVersion -- Returns the version of the server.\n" +
|
||||
" - /help -- Show this information.\n" +
|
||||
" - /quit -- Quit.\n");
|
||||
if(admin) {
|
||||
|
Reference in New Issue
Block a user