-
|
Hej everyone, Quick question: Is it possible to extract the control characters used for IRC message formatting (like color codes, bold, etc.) from the PRIVMSG event using girc? For example, if I send a purple hello world, the message currently appears in the logs as just 6hello world (I'm using the example code for now). I'm not sure if this is the expected behavior or if I'm missing something. I'm planning to build a lightweight logger for a closed IRC server where users heavily rely on message formatting. My goal is to parse and preserve the formatting (color codes, bold, underline, etc.) so the logs can later be output nicely—either in a PDF or on a web page. It would also be an ideal project for me to learn go a bit more. Is there any way to access the raw message string with control characters intact using this library? Something like a Raw() function would be ideal, but I couldn't find anything like that in the docs or examples. I would expect a formatted Many thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
If you're seeing and sending a red fg, lightgreen bg message with "foobar", I see ( |
Beta Was this translation helpful? Give feedback.
If you're seeing
6hello world, that means it has all of the control codes, but might be in a format that whatever you're logging to may not like. For example, using the following:and sending a red fg, lightgreen bg message with "foobar", I see (
%qin this case escaping everything, so you see the raw version):