Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parts not shown if we kill the application #73

Closed
casperstorm opened this issue Jun 30, 2023 · 6 comments
Closed

Parts not shown if we kill the application #73

casperstorm opened this issue Jun 30, 2023 · 6 comments
Assignees
Labels
Milestone

Comments

@casperstorm
Copy link
Member

If a user kills the application, or connection, we don't see the {user} has left the channel

@ineeee
Copy link

ineeee commented Jul 1, 2023

this makes sense because the client never sends a PART or QUIT to the server

@casperstorm casperstorm self-assigned this Jul 4, 2023
@tarkah
Copy link
Member

tarkah commented Jul 4, 2023

What's the expected behavior here? Does IRC mandate a client sends QUIT before exiting? I'd imagine the server will broadcast part / quit when the client loses connection to the server.

I'd imagine we only want to implement this if we add a configuration where user can specify a QUIT / PART message when exiting the application / leaving channels.

Edit: From IRC docs:

If a client connection is closed without the client issuing a QUIT command to the server, the server MUST distribute a QUIT message to other clients informing them of this, distributed in the same was an ordinary QUIT message. Servers MUST fill with a message reflecting the nature of the event which caused it to happen. For instance, "Ping timeout: 120 seconds", "Excess Flood", and "Too many connections from this IP" are examples of relevant reasons for closing or for a connection with a client to have been closed.

@ineeee
Copy link

ineeee commented Jul 4, 2023

the client doesn't/can't determine the quit message because the process is already dead by that point, so its up to the irc daemon.

edit: saw the above edit while sent this :p

@tarkah
Copy link
Member

tarkah commented Jul 4, 2023

the client doesn't/can't determine the quit message because the process is already dead by that point, so its up to the irc daemon.

We actually capture the request to close the application and do some housecleaning... (flush history to disk, etc). So in theory we could send a QUIT from our client w/ a configurable message, if desired. This obv doesn't work if someone kills the running process vs graceful close.

@tarkah
Copy link
Member

tarkah commented Jul 4, 2023

I'd imagine though that we should never send PART and only send QUIT as that is effectively a superset of PART. QUIT inherently means they have parted from all channels.

So I think the scope of this issue should be:

  • Send QUIT when user closes the application. Allow for configuring the QUIT message otherwise it sends an empty reason.

@casperstorm
Copy link
Member Author

Fixed by #109.
Opened #110 which continues the above discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants