Index: DefaultSettings.php===================================================================--- DefaultSettings.php (revision 35481)+++ DefaultSettings.php (working copy)@@ -1934,6 +1934,8 @@ $wgRC2UDPAddress = false; $wgRC2UDPPort = false; $wgRC2UDPPrefix = '';+# Format of the IRC messages: Empty = standard color-code separated, "PHP" = using serialize()+$wgIRCFormat = ''; # Enable user search in Special:Newpages # This is really a temporary hack around an index install bug on some Wikipedias.Index: RecentChange.php===================================================================--- RecentChange.php (revision 35481)+++ RecentChange.php (working copy)@@ -559,7 +559,7 @@ function getIRCLine() { global $wgUseRCPatrol;-+ global $wgIRCFormat; // FIXME: Would be good to replace these 2 extract() calls with something more explicit // e.g. list ($rc_type, $rc_id) = array_values ($this->mAttribs); [or something like that] extract($this->mAttribs);@@ -608,10 +608,20 @@ $comment = $this->cleanupForIRC( $rc_comment ); $flag = ($rc_new ? "N" : "") . ($rc_minor ? "M" : "") . ($rc_bot ? "B" : ""); }- # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,- # no colour (\003) switches back to the term default- $fullString = "\00314[[\00307$title\00314]]\0034 $flag\00310 " .- "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";+ switch( $wgIRCFormat ) {+ case "PHP":+ #we use serialize() format here, to make the IRC output way better machine-readable+ $ircline = array( "url" => $url, "title" => $title,+ "summary" => $summary, "flags" => $flag,+ "user" => $user, "sizediff" => $szdiff+ );+ $fullString=serialize($ircline);+ default:+ # see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,+ # no colour (\003) switches back to the term default+ $fullString = "\00314[[\00307$title\00314]]\0034 $flag\00310 " .+ "\00302$url\003 \0035*\003 \00303$user\003 \0035*\003 $szdiff \00310$comment\003\n";+ } return $fullString; }