package server.commands;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import org.quickserver.net.server.ClientHandler;
import server.constants.Messages;
import server.protocol.ClientInfo;
import server.protocol.GameRoom;
/**
* The Class Said. Handles the said command and sends the message to clients.
*/
public class Said implements Command {
public void execute(ClientHandler handler, GameRoom room,
List<String> splitted) throws IOException {
ClientInfo data = (ClientInfo) handler.getClientData();
if (splitted.size() > 1) {
methods.sendMessage(handler, room,
Messages.SAIDMSG(new Date(), data.getName(), splitted.get(1)));
}
}
}