private void DoRequestConnect(StreamWriter sw, string message, Client client)
        {
            var room = GetByName(message);

            if (!room.ClientExists(client))
            {
                GetByName(message).AddClient(client);
            }
            sw.WriteLine("connect:yes," + MessageLogger.ReadFromFile(message));
            sw.Flush();
        }
        private void DoRequestMessage(StreamWriter sw, string message, Client client)
        {
            var args     = message.Split(',');
            var chatRoom = GetByName(args[0]);

            sw.Flush();
            args[1] = client.Name + ": " + args[1];

            MessageLogger.LogToFile(args[0], args[1]);
            chatRoom.Say(args[1]);
            chatRoom.messages++;

            Thread.Sleep(100);
        }
        private void DoRequestPrivate(StreamWriter sw, string message, string nameFrom)
        {
            var cmd = message.Split(',');

            switch (cmd[0])
            {
            case "refresh":
            {
                string names = String.Empty;
                conn.ConnectionList.ForEach(cl =>
                    {
                        names += String.Format("{0},", cl.Name);
                    });
                if (!names.Equals(String.Empty))
                {
                    names = names.Remove(names.Length - 1);
                }
                sw.WriteLine("private:refresh," + names);
                sw.Flush();
                break;
            }

            case "message":
            {
                var name = cmd[1];
                var msg  = cmd[2];

                string key = MessageLogger.CheckExistanse(name, nameFrom);
                if (key == null)
                {
                    key = name + nameFrom;
                }
                MessageLogger.LogToFile(key, nameFrom + ": " + msg);

                msg = MessageLogger.ReadFromFile(key);

                var client = conn.GetByName(name);
                var writer = new StreamWriter(client.ClientSocket.GetStream());
                writer.WriteLine("private:message," + nameFrom + "," + msg);
                writer.Flush();
                break;
            }

            default:
                break;
            }
        }