コード例 #1
0
        public void setTitle(string[] commandParts)
        {
            if (commandParts[1] == "332")
            {
                string title = string.Empty;
                if (commandParts[4].Substring(0, 1) == ":")
                {
                    commandParts[4] = commandParts[4].Remove(0, 1);
                }

                for (int intI = 4; intI < commandParts.Length; intI++)
                {
                    title += " " + commandParts[intI];
                }

                _messages += title + " \n";
                _title    += title;
                _server.ReceivedChannelMessages(this, title);
                _server.ReceivedChannelCommands(this, "TOPIC");
            }
            else if (commandParts[1] == "333")
            {
                string message = "Topic for " + _name + " set by " + commandParts[4] + " on " + " \n";
                _messages += message;
                _server.ReceivedChannelMessages(this, message);
            }
        }