Finally got rid of multithreading! Now using a modern poll(). Can actually have a working quit command on #smirc.