On Sat, Sep 12, 2009 at 18:27, APseudoUtopia apseudoutopia@gmail.com wrote:
Hey list,
I have an IRC bot. I'm integrating the mediawiki RC announcement into the bot by having it listen on a UDP ip/port, parsing the incoming message, then announcing it on IRC.
I'm having trouble in the "parsing" part of that. The RC announcement message sent from MW is very messy, with random numbers and other characters mixed in. I've been trying to write a regex to group this into the Username, the edit reason, the page edited, and the URL of the diff....but I'm having quite a bit of trouble.
I have this in my LocalSettings.php: $wgRC2UDPAddress = '127.0.0.1'; $wgRC2UDPPort = '1223'; $wgRC2UDPPrefix = 'Wiki: ';
The string sent to the socket is something like: Wiki: 14[[07To Do14]]4 10 02http://domain.tld/wiki/index.php?diff=230&oldid=201 5* 03Username 5* (-45) 10Removed IRC line; added something else
aren't those color codes for IRC?
henna/Finne