Ejemplo n.º 1
0
        public static async Task DoThingsAsyncBotAsync2Async(string data)
        {
            ;

            try
            {
                var result = JsonConvert.DeserializeObject <object>(data);
                ;

                if (result is JArray r2)
                {
                    ;
                    foreach (var r3 in r2)
                    {
                        ;

                        if (r3 is JObject r4)
                        {
                            ;

                            var webPost = new WebPost(r4);
                            await DoThingsAsyncBotAsync3Async(webPost);
                        }
                    }
                }
            }
            catch
            {
                ;
            }
        }
Ejemplo n.º 2
0
        private static async Task DoThingsAsyncBotAsync3Async(WebPost webPost)
        {
            if (dictionary_webpost == null)
            {
                dictionary_webpost = GetDictionary();
            }

            lock (dictionary_webpost)
            {
                _ = DoThingsAsyncBotAsync4Async(webPost);
            }
        }
Ejemplo n.º 3
0
        private static async Task DoThingsAsyncBotAsync4Async(WebPost webPost)
        {
            if (webPost == null)
            {
                return;
            }

            if (webPost.seen == 'Y')
            {
                return;
            }

            if (dictionary_webpost == null)
            {
                dictionary_webpost = GetDictionary();
            }

            if (dictionary_webpost.ContainsKey(webPost.postid) &&
                dictionary_webpost[webPost.postid].seen == 'Y')
            {
                return;
            }

            ;

            try
            {
                await webPost.SetAsSeenAsync();

                await webPost.PlaceInQueue();

                dictionary_webpost[webPost.postid] = webPost;
                WriteDict();
            }
            catch (Exception e)
            {
                ;
            }
        }
Ejemplo n.º 4
0
        internal static async void DoThingsAsyncBotAsync(object obj)
        {
            var bot = await WebPost.GetAnonBotAsync();

            if (bot == null)
            {
                return;
            }

            if (string.IsNullOrEmpty(ConfigAnon.password))
            {
                return;
            }

            try
            {
                await NotifyUtil.NotifyOwners(new Exception("Check anon message started."), bot);
            }
            catch
            {
                ;
            }

            if (dictionary_webpost == null)
            {
                dictionary_webpost = GetDictionary();
            }

            while (true)
            {
                lock (random)
                {
                    _ = IterationAsync2Async(bot);
                    Thread.Sleep(timesleep);
                }
            }
        }
 public MessaggeAnonToSendInQueue(WebPost webPost)
 {
     e2 = webPost;
 }