Esempio n. 1
0
 private void doQuery(String cmd) {
   // if(cmd.charAt(0) == ' ') cmd = cmd.substring(1);
   cmd = cmd.trim();
   if (onlineUsers.containsKey(cmd)) {
     ClientThread c = (ClientThread) onlineUsers.get(cmd);
     writeLine("CHAT *** " + c.getNickname() + " is from " + c.getRemoteAddr() + " ***");
   } else {
     writeLine("CHAT *** " + cmd + " is UNKNOWN ***");
   }
 } // doQuery
Esempio n. 2
0
 private void doList() {
   for (Enumeration e = onlineUsers.elements(); e.hasMoreElements(); ) {
     ClientThread c = (ClientThread) e.nextElement();
     writeLine("CHAT *** [" + c.getNickname() + "@" + c.getRemoteAddr() + "] ***");
   } // for
 } // doList