Skip to content

Supybot Website

Sections
Personal tools
You are here: Home » Supybot Discussion Forums » Developer Forum » Newlines in module replies

 • Newlines in module replies

Document Actions
Replies: 2   Views: 2865
Up one level
You need to be a registered member to post to this forum. Register now.

 • Newlines in module replies

Posted by kamikaze at 18:07 August 29, 2006
I've been hunting around in code and online and haven't found an answer yet, so here goes. Is there a way to insert a newline into supybot's reply from a module function? Everything I've seen so far either leaves them inline as text (foo\nbar) or strips them. I have a few lines of information returning from a function and I'd really like to put newlines in the reply, but I just can't seem to make it work.
Member
Posts: 2

 • Re: Newlines in module replies

Posted by jamessan at 21:10 August 29, 2006
Newline characters aren't valid characters in an IRC message. The newline actually terminates the message, which is why we turn it into the two characters '\' and 'n'. You can use irc.replies (instead of irc.reply) and set the supybot.reply.oneToOne config var to false.
Manager
Posts: 104

 • Re: Newlines in module replies

Posted by kamikaze at 13:56 August 30, 2006
That's the feeling I was getting. It seems like some clients will accept \n embedded in an m-quote and display it as a newline, but that's kind of unreliable.

Thanks for the quick answer.
Member
Posts: 2

 

Powered by Plone

This site conforms to the following standards: