示例#1
0
 public LastFMService(ServiceConfig config)
 {
     Config         = config;
     Status         = new StatusBase();
     pollTimer      = new Timer(new TimerCallback(pollTimer_Tick), null, Timeout.Infinite, Timeout.Infinite);
     MusicTrackInfo = new MusicTrackInfo();
 }
示例#2
0
        public SteamChat(ChatConfig config) : base()
        {
            Config           = config;
            ContentParsers   = new List <Action <ChatMessage, IChat> >();
            ChatChannelNames = new List <string>();
            Emoticons        = new List <Emoticon>();
            Status           = new StatusBase();
            Users            = new Dictionary <string, ChatUser>();

            Logon             += SteamChat_Logon;
            NewMessage        += SteamChat_NewMessage;
            FriendStateChange += SteamChat_FriendStateChange;
            Typing            += SteamChat_Typing;
            SteamGuard        += SteamChat_SteamGuard;

            Enabled            = Config.Enabled;
            HideViewersCounter = true;

            whiteList = new HashSet <string>();
            foreach (var nick in Config.Parameters.StringArrayValue("Whitelist").Select(chan => chan.ToLower()).ToList())
            {
                whiteList.Add(nick);
            }
            messageFormatString = config.GetParameterValue("MessageFormat") as string;
        }
示例#3
0
 public ChatBase(ChatConfig config)
 {
     Config                 = config;
     IconURL                = config.IconURL;
     ChatName               = config.ChatName;
     ContentParsers         = new List <Action <ChatMessage, IChat> >();
     ChatChannels           = new List <IChatChannel>();
     Emoticons              = new List <Emoticon>();
     Status                 = new StatusBase();
     Users                  = new Dictionary <string, ChatUser>();
     IsAnonymous            = true;
     ReceiveOwnMessages     = false;
     Enabled                = Config.Enabled;
     IsChannelCaseSensitive = false;
     JoinByNickName         = true;
 }
示例#4
0
 public OBSRemoteService(ServiceConfig config)
 {
     Config = config;
     Status = new StatusBase();
 }
示例#5
0
 public ChatToImageService(ServiceConfig config)
 {
     Config = config;
     Status = new StatusBase();
 }
 public WebServerService(ServiceConfig config) : base(config.GetParameterValue("Port"))
 {
     Config          = config;
     Status          = new StatusBase();
     imageDataSource = SimpleIoc.Default.GetInstance <IImageDataSource>();
 }
 public ChatToFileService(ServiceConfig config)
 {
     Config = config;
     Status = new StatusBase();
     AppendText(String.Format("Log started: {0}", DateTime.Now.ToString()));
 }