private void Request_Create_Channel( CChatChannelConfig channel_config, CCreateChatChannelResponseServerMessage response_msg )
        {
            response_msg.Error = channel_config.Make_Valid();
            if ( response_msg.Error != EChannelCreationError.None )
            {
                return;
            }

            if ( channel_config.CreatorID != EPersistenceID.Invalid )
            {
                if ( Get_Player_By_Persistence_ID( channel_config.CreatorID ) == null )
                {
                    response_msg.Error = EChannelCreationError.UnknownPlayer;
                    return;
                }
            }

            if ( Get_Channel_By_Internal_Name( channel_config.InternalName ) != null )
            {
                response_msg.Error = EChannelCreationError.DuplicateInternalName;
                return;
            }

            EChannelID channel_id = Allocate_Channel_ID();
            CServerChatChannel new_channel = new CServerChatChannel( channel_id, channel_config );

            m_Channels.Add( channel_id, new_channel );
            m_ChannelInternalNames.Add( channel_config.InternalName.ToUpper(), channel_id );

            response_msg.ChannelID = channel_id;
            response_msg.ChannelName = channel_config.ExternalName;

            if ( channel_config.CreatorID != EPersistenceID.Invalid )
            {
                if ( Request_Join_Channel( channel_config.CreatorID, channel_id, EChannelGameProperties.None ) != EChannelJoinError.None )
                {
                    response_msg.Error = EChannelCreationError.UnableToAutoJoin;
                    Request_Destroy_Channel( channel_id );
                    return;
                }
            }
        }
        private void Handle_Create_Chat_Channel_Server_Message( CCreateChatChannelRequestServerMessage message )
        {
            CCreateChatChannelResponseServerMessage create_response_msg = new CCreateChatChannelResponseServerMessage( message.RequestID );
            Instance.Request_Create_Channel( message.Config, create_response_msg );
            Instance.Send_Message_To_Game_Server( create_response_msg );

            CLog.Log( ELoggingChannel.Chat, ELogLevel.Medium, String.Format( "Attempted to create chat channel {0}, error = {1}.", message.Config.InternalName, create_response_msg.Error.ToString() ) );
        }