Added notifyRC2UDP() convenience function
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 14 Jan 2009 01:45:52 +0000 (01:45 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 14 Jan 2009 01:45:52 +0000 (01:45 +0000)
includes/RecentChange.php

index ac4de97..50b949c 100644 (file)
@@ -197,6 +197,14 @@ class RecentChange
                                $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