Prism.py for Konversation

There is a great weechat script called prism.py. It assigns random colors to each letter in your message and sends it to the chat, making it look like a rainbow. I wanted something similar for Konversation, wchih I'm using on my personal laptop, so when I finally opened the documentation and saw that it supports scripting, I had no more excuses.

Colorized text: light mode

Colorized text: dark mode

Here is the script.

Read more...

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.

Read more...