Separated 'exit' and 'self-destroy' and added functionality to remove agents from the teamserver to cleanup the sessions table.

This commit is contained in:
Jakob Friedl
2025-10-27 15:17:56 +01:00
parent f5ff90fc47
commit f30f1d2ec0
7 changed files with 51 additions and 37 deletions

View File

@@ -193,6 +193,9 @@ proc draw*(component: SessionsTableComponent, showComponent: ptr bool, connectio
for i, agent in component.agents:
if not ImGuiSelectionBasicStorage_Contains(component.selection, cast[ImGuiID](i)):
newAgents.add(agent)
else:
# Send message to team server to remove delete the agent from the database and stop it from re-appearing when the client is restarted
connection.sendAgentRemove(agent.agentId)
component.agents = newAgents
ImGuiSelectionBasicStorage_Clear(component.selection)