Ejemplo n.º 1
0
  public void sendGlobalServerMsg(String msg) {
    int i;
    connection you;

    for (i = 0; i < connections.size(); i++) {
      you = (connection) connections.elementAt(i);
      you.sendServerMsg(msg);
    }
  }
Ejemplo n.º 2
0
  public boolean userExists(String name) {
    int i;
    connection you;

    for (i = 0; i < connections.size(); i++) {
      you = (connection) connections.elementAt(i);
      if (you.getNickname().equals(name)) {
        return true;
      }
    }
    return false;
  }
Ejemplo n.º 3
0
 public void removeConnection(connection c) {
   connections.removeElement(c);
   sendGlobalServerMsg("Benutzer " + c.getNickname() + " hat den Server verlassen");
 }