IRC server rejects custom quit message: solution
I was working on my IRC bot recently when I stumbled upon a confusing problem while trying to add a graceful shutdown. The idea is that when a process receives a request to terminate itself (SIGTERM), it should send a QUIT command with some text, rather than disappearing like some barbarian.
Like this:
<= QUIT :bye
=> :poring-dev!~poring@user/poring QUIT :Quit: bye
Alas, the IRC server completely ignored my message, replacing it with a generic "Client Quit" text:
<= QUIT :bye
=> :poring-dev!~poring@user/poring QUIT :Client Quit
I spent about two hours trying different things and debugging my code to no avail. I knew the command I was sending was valid and that Libera Chat supported this feature.
What I didn't know is that there's apparently a type of spam attack that utilizes quit messages.