I tried to append the line endings but it still doesn’t work. Would it help if I posted some more of the source code?
EDIT: Apparently it works if I run the script on my local computer instead of the server. Now a different question: May a IP be temporarly banned for being in a channel and writing a message every 10 minutes for about 2 days?