$this->mAttribs['rc_last_oldid'] );
}
}
+
+ public function notifyRC2UDP() {
+ global $wgRC2UDPAddress, $wgRC2UDPOmitBots;
+ # Notify external application via UDP
+ if( $wgRC2UDPAddress && ( !$this->mAttribs['rc_bot'] || !$wgRC2UDPOmitBots ) ) {
+ self::sendToUDP( $this->getIRCLine() );
+ }
+ }
/**
* Send some text to UDP
}
/**
- * Remove newlines and carriage returns
+ * Remove newlines, carriage returns and decode html entites
* @param string $line
* @return string
*/
public static function cleanupForIRC( $text ) {
- return str_replace(array("\n", "\r"), array("", ""), $text);
+ return Sanitizer::decodeCharReferences( str_replace( array( "\n", "\r" ), array( "", "" ), $text ) );
}
/**
{
global $wgLogRestrictions;
# Don't add private logs to RC!
- if( isset($wgLogRestrictions[$type]) && !$wgLogRestrictions[$type] == '*' ) {
+ if( isset($wgLogRestrictions[$type]) && $wgLogRestrictions[$type] != '*' ) {
return false;
}
$rc = self::newLogEntry( $timestamp, $title, $user, $actionComment, $ip, $type, $action,
return $trail;
}
- protected function getIRCLine() {
+ public function getIRCLine() {
global $wgUseRCPatrol, $wgUseNPPatrol, $wgRC2UDPInterwikiPrefix, $wgLocalInterwiki;
// FIXME: Would be good to replace these 2 extract() calls with something more explicit