예제 #1
0
 private void OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     if (logType != DebugLogType.None)
     {
         Logger.LogMessage("Twitch chat disconnected");
     }
 }
예제 #2
0
 // Token: 0x06000016 RID: 22 RVA: 0x00002D10 File Offset: 0x00000F10
 private void onLeaveChannel(object sender, OnDisconnectedArgs e, int position)
 {
     try
     {
         this.Log(e.BotUsername + " Disconnected");
         this.Common.Dispatcher.Invoke(delegate()
         {
             (this.Common.Items[position] as ListBoxItem).Foreground = Brushes.White;
         });
         this.status[position] = "Sleep";
         this.connections--;
         this.statuslbl.Dispatcher.Invoke(delegate()
         {
             this.statuslbl.Content = "Status: " + this.connections;
         });
     }
     catch (Exception ex)
     {
         try
         {
             this.Log(ex.Message);
         }
         catch
         {
         }
     }
 }
        /// <summary>
        /// Called when the twitch client disconnects (callback)
        /// </summary>
        private async void OnDisconnect(object sender, OnDisconnectedArgs e)
        {
            logger.Error("disconnected from the twitch channel, trying to reconnect");
            await Task.Delay(RECONNECT_INTERVAL);

            client.Connect();
        }
예제 #4
0
        private void OnDisconnected(object sender, OnDisconnectedArgs e)
        {
            StatusArgs status = new StatusArgs();

            status.Status = StatusArgs.TwitchBotStatus.Disconnected;
            StatusEvent(this, status);
        }
예제 #5
0
        private void TwitchClientOnOnDisconnected(object sender, OnDisconnectedArgs onDisconnectedArgs)
        {
            _twitchClient.OnDisconnected -= TwitchClientOnOnDisconnected;
            _isReady = false;

            _disconnectionCompletionTask.SetResult(true);
            _connectionCompletionTask = new TaskCompletionSource <bool>();
        }
예제 #6
0
 private void TwitchClientOnDisconnected(object sender, OnDisconnectedArgs e)
 {
     _twitchClient.OnDisconnected -= TwitchClientOnDisconnected;
     _isReady = false;
     _disconnectionCompletionTask.SetResult(true);
     _connectionCompletionTask = new TaskCompletionSource <bool>();
     SendMessage("Liphe is leaving for now, chill out");
 }
예제 #7
0
        private void TwitchClientOnOnDisconnected(object sender, OnDisconnectedArgs onDisconnectedArgs)
        {
            _logger.LogInformation($"{nameof(TwitchChatClient)} disconnected");
            _twitchClient.OnDisconnected -= TwitchClientOnOnDisconnected;
            _isReady = false;

            _disconnectionCompletionTask.SetResult(true);
            _connectionCompletionTask = new TaskCompletionSource <bool>();
        }
예제 #8
0
 private void Client_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     if (e.Username.ToString() == name)
     {
         this.Dispatcher.Invoke(() => Chat.Items.Insert(0, "Client is disconnected from mIRC Server"));
         this.Dispatcher.Invoke(() => stateUserControl(false));
         this.Dispatcher.Invoke(() => controlListMemory());
     }
 }
예제 #9
0
        /// <summary>
        /// Invokes the disconnected.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="botUsername">The bot username.</param>
        public static void InvokeDisconnected(this TwitchClient client, string botUsername)
        {
            OnDisconnectedArgs model = new OnDisconnectedArgs()
            {
                BotUsername = botUsername
            };

            client.RaiseEvent("OnDisconnected", model);
        }
예제 #10
0
        /// <summary>
        /// [handler] ОТКЛЮЧЕНИЕ от сервера
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void onDisconnected(object sender, OnDisconnectedArgs e)
        {
            CheckForIllegalCrossThreadCalls = false;

            client.LeaveChannel(currChannel);
            client.OnDisconnected    -= onDisconnected;
            client.OnMessageReceived -= globalMessageRecieved;

            printInfo("Disconnected!");
        }
예제 #11
0
        private void OnDisconnected(object sender, OnDisconnectedArgs e)
        {
            if (!userDisconnect)
            {
                LabelChange(@"Status: Reconnecting...");

                twitchClient.Connect();
            }
            else
            {
                LabelChange(@"Status: Disconnected");
            }
        }
예제 #12
0
        private void Cl_OnDisconnected(object sender, OnDisconnectedArgs e)
        {
            try
            {
                reconnectTryCt++;
                if (reconnectTryCt >= maxRetryCt)
                {
                    doNotReconnect = true;
                }

                if (doNotReconnect)
                {
                    this.logger.LogWarning("Chat Disconnected. Not attempting to reconnect.", true);
                }
                else
                {
                    new Thread(() =>
                    {
                        try
                        {
                            this.logger.LogWarning($"Chat Disconnected. Trying to reconnect (attempt {reconnectTryCt}) in 15 seconds... ");
                            Thread.Sleep(15000);
                            this.logger.LogWarning($"Attempt {reconnectTryCt} Connecting...");
                            connect();
                        }
                        catch (Exception exc)
                        {
                            this.logger.LogError(ExceptionFormatter.FormatException(exc, $"Exception in {this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod().Name} (ReconnectThread Exception)"));
                        }
                    }).Start();
                }
            }
            catch (Exception exc)
            {
                this.logger.LogError(ExceptionFormatter.FormatException(exc, $"Exception in {this.GetType().Name} - {System.Reflection.MethodBase.GetCurrentMethod().Name}"));
            }
        }
예제 #13
0
 private void OnDisconnected(object sender, OnDisconnectedArgs e) => Disconnected();
예제 #14
0
 private void Client_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     client.Reconnect();
     timeAlive.Restart();
 }
예제 #15
0
 private void onDisconnected(object sender, OnDisconnectedArgs e)
 {
     Console.WriteLine("Disconected BotName: " + e.BotUsername + " " + DateTime.Now);
 }
예제 #16
0
 private void Client_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     consoleMessage[5] = "Disconnected";
     Program.SendToConsole(consoleMessage);
 }
예제 #17
0
 private void ConnectButton_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     ChangeButtonLayout("Connect", Color.green, true);
 }
예제 #18
0
 private void OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     Debug.LogWarning("Disconnected");
 }
예제 #19
0
 public void OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     //CheckForIllegalCrossThreadCalls = false;
     AddChat("<< Disconnected from channel >>");
     SetStatus("Disconnected");
 }
예제 #20
0
 private void clientOnDisconnected(object sender, OnDisconnectedArgs e)
 {
     msgError("Disconnected from Twitch chat!");
     Console.Title = "Exilios State: Disconnected";
 }
예제 #21
0
 private void Disconnected(object sender, OnDisconnectedArgs e)
 {
     Reboot();
 }
예제 #22
0
파일: Client.cs 프로젝트: Oxropy/Oxcha
 private void Client_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     handler.OnDisconnect(this);
 }
예제 #23
0
 private void ClientOnOnDisconnected(object sender, OnDisconnectedArgs e)
 {
     Debug.Log($"[Client] Disconnected, reconnecting");
     _client.Reconnect();
 }
예제 #24
0
 private void DisconnectedHandler(object sender, OnDisconnectedArgs e) => Debug.Log($"Game disconnected.");
예제 #25
0
 private void Client__OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     client_.Connect();
 }
예제 #26
0
파일: Form1.cs 프로젝트: Inzaniity/Twitcher
 private void OnDisconnect(object sender, OnDisconnectedArgs e)
 {
     PrintLog("Disconnected from #" + Properties.Settings.Default.channelname);
 }
예제 #27
0
 private void Client_OnDisconnect(object sender, OnDisconnectedArgs e)
 {
     return;
 }
예제 #28
0
 private void Client_OnDisconnect(object sender, OnDisconnectedArgs e)
 {
     System.Console.WriteLine($"+++++ Disconnected fron Channel +++++");
 }
예제 #29
0
 void Client_OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     logger?.Log($"{e.BotUsername} disconnected in Twitch chat.");
 }
예제 #30
0
 private void OnDisconnected(object sender, OnDisconnectedArgs e)
 {
     Debug.Log("<color=orange> Disconnected:  " + e.BotUsername + "</color>");
 }