private void ClientOnMessageReceived(object sender, MessageEventArgs e) { var formattedMessage = this.FormatMessage(e.Message); if (formattedMessage != null) { Console.WriteLine(formattedMessage); } if (e.Message.MessageType == Message.Type.EndOfMotd) // Reasonably safe to start sending commands by this point. { foreach (var channel in _config.Server.Channels) { _client.SendLine($"JOIN {channel}"); } } }