Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a <see cref="ChatSetupInfo"/> from optional <paramref name="baseInfo"/>
        /// </summary>
        /// <param name="provider">The <see cref="ChatProvider"/> that this <see cref="ChatSetupInfo"/> is for</param>
        /// <param name="baseInfo">Optional past data</param>
        /// <param name="numFields">The number of fields in this chat provider</param>
        protected internal ChatSetupInfo(ChatProvider provider, ChatSetupInfo baseInfo, int numFields)
        {
            numFields       += BaseIndex;
            InitializeFields = baseInfo == null || baseInfo.DataFields.Count != numFields;

            if (InitializeFields)
            {
                DataFields = new List <string>(numFields);
                for (var I = 0; I < numFields; ++I)
                {
                    DataFields.Add(null);
                }

                AdminList        = new List <string>();
                AdminChannels    = new List <string>();
                DevChannels      = new List <string>();
                GameChannels     = new List <string>();
                WatchdogChannels = new List <string>();
                AdminsAreSpecial = false;
                Enabled          = false;
            }
            else
            {
                DataFields = baseInfo.DataFields;
            }
            Provider = provider;
            Specialize(true);               //to check we have a valid provider
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Construct Discord setup info from optional generic info. Default is not a valid discord bot tokent
 /// </summary>
 /// <param name="baseInfo">Optional generic info</param>
 public DiscordSetupInfo(ChatSetupInfo baseInfo = null) : base(ChatProvider.Discord, baseInfo, FieldsLen)
 {
     if (!InitializeFields)
     {
         return;
     }
     BotToken = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";             //needless to say, this is fake
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Construct IRC setup info from optional generic info. Defaults to TGS3 on rizons IRC server
        /// </summary>
        /// <param name="baseInfo">Optional generic info</param>
        public IRCSetupInfo(ChatSetupInfo baseInfo = null) : base(ChatProvider.IRC, baseInfo, FieldsLen)
        {
            if (!InitializeFields)
            {
                return;
            }

            Nickname         = "TGS3";
            URL              = "irc.rizon.net";
            Port             = 6667;
            AuthTarget       = "";
            AuthMessage      = "";
            AdminsAreSpecial = true;
            AuthLevel        = IRCMode.Op;
        }