Example #1
0
 partial void ProcessEachClientLeftView(ClientLeftView clientLeftView)
 {
     if (clientLeftView.ClientId == packetHandler.ClientId)
     {
         context.ExitReason = Reason.LeftServer;
         DisconnectInternal(context, setStatus: TsClientStatus.Disconnected);
     }
 }
Example #2
0
    public void StopSpotifyOnLeave(object sender, ClientLeftView ev)
    {
        string id = ev.ClientId.ToString();

        if (activeSpotifyAccount != null && activeSpotifyAccount.getClient() == id)
        {
            stopSpotify();
            info("User " + ev.ClientId.Value + " (" + id + ") disconnected");
        }
    }
Example #3
0
        private void OnBobDisconnnect(object sender, ClientLeftView e)
        {
            if (bobClient == null || e.ClientId != bobClient.ClientId)
            {
                return;
            }

            bobClient = null;
            isRunning = false;
            commandQueue.Clear();
            timeout.Active = false;
            Log.Write(Log.Level.Debug, "BC bob is now officially dead");
        }
Example #4
0
        partial void ProcessEachClientLeftView(ClientLeftView clientLeftView)
        {
            var ctx = context;

            if (ctx is null)
            {
                throw new InvalidOperationException("context should be set");
            }

            if (clientLeftView.ClientId == ctx.PacketHandler.ClientId)
            {
                ctx.ExitReason = clientLeftView.Reason;
                ChangeState(ctx, TsClientStatus.Disconnected);
            }
        }
		private void ExtendedClientLeftView(object sender, ClientLeftView eventArgs)
		{
			clientbufferOutdated = true;
			OnClientDisconnect?.Invoke(sender, eventArgs);
		}
Example #6
0
 public void UpdateClientLeftView(ClientLeftView msg)
 {
     RemoveClient(msg.ClientId);
 }
Example #7
0
 private void OnClientDisconnect(object sender, ClientLeftView eventArgs)
 {
     TargetManager.WhisperClientUnsubscribe(eventArgs.ClientId);
     SessionManager.RemoveSession(eventArgs.ClientId);
 }
Example #8
0
 partial void ProcessEachClientLeftView(ClientLeftView notifies);
Example #9
0
 private void QueryConnection_OnClientDisconnect(object sender, ClientLeftView e)
 {
     bot.QueryConnection.SendMessage("ciao", e.ClientId);
 }
Example #10
0
 partial void PostClientLeftView(ClientLeftView msg);
Example #11
0
 private void OnClientLeftView(object?sender, ClientLeftView eventArgs)
 {
     targetManager.WhisperClientUnsubscribe(eventArgs.ClientId);
     sessionManager.RemoveSession(eventArgs.ClientId);
 }
 private void ExtendedClientLeftView(object sender, ClientLeftView eventArgs)
 {
     clientbufferOutdated = true;
     OnClientDisconnect?.Invoke(sender, eventArgs);
 }
Example #13
0
		private void OnBobDisconnnect(object sender, ClientLeftView e)
		{
			if (bobClient == null || e.ClientId != bobClient.ClientId) return;

			bobClient = null;
			isRunning = false;
			commandQueue.Clear();
			timeout.Active = false;
			Log.Write(Log.Level.Debug, "BC bob is now officially dead");
		}