Exactly
I’d just
- on rawMessage
- file_put_contents(target, rawMessage, FILE_APPEND);
And use a separate PHP script to read and parse out the stuff/messages I’m looking for.
Now this is what I’d do if I’m building a chat logger and wanted all messages, since there are some useful messages that are not PRIVMSG (user USERNOTICE)
And better to collect it all and process later, than to go “well I wish I’d collected that at the time”
There are some other options but it depends what you intend to do with what you collect and why you are collecting