private void sendClientUserTICKET(byte[] clientPublicKey) {
   String[] usrs = UserIPDatabase.getInstance().getOnlineUsers().split(";");
   for (String user : usrs) {
     // send user name
     byte[] bytes = ("Ticket:" + user).getBytes();
     sendWithEncryptNounce(bytes);
     // send ticket
     bytes = UserIPDatabase.getInstance().getTICKET(user, clientPublicKey, Server.privateKey);
     sendWithEncryptNounce(bytes);
   }
   sendWithEncryptNounce("TDone".getBytes());
 }
 private boolean authUser(String line, byte[] hashcode, byte[] key) {
   String[] strs = line.split(":");
   if (strs.length < 4) {
     System.out.println("Input format error: " + line);
     return false;
   } else {
     if (UsersInfoDatabase.getInstance().authUser(strs[3].trim(), hashcode)) {
       // update user -> ip hash map
       UserIPDatabase.getInstance().update(strs[3].trim(), ip, strs[2].trim(), key);
       return true;
     } else {
       return false;
     }
   }
 }
 private void sendClientUserIP() {
   String message = "UserIP:";
   message += UserIPDatabase.getInstance().getOnlineUserIPs();
   byte[] bytes = message.getBytes();
   sendWithEncryptNounce(bytes);
 }