for (int i = connections.length - 1; i >= 0; i--) {
ChatConnection connection = (ChatConnection)connections[i];
names.add(connection.name);
}
// Send the names to everyone.
UpdateNames updateNames = new UpdateNames();
updateNames.names = (String[])names.toArray(new String[names.size()]);
server.sendToAllTCP(updateNames);
}