Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | # Writes the data in this object to the database |
142 | 142 | function save() |
143 | 143 | { |
144 | | - global $wgLocalInterwiki, $wgPutIPinRC, $wgRC2UDPAddress, $wgRC2UDPOmitBots; |
| 144 | + global $wgLocalInterwiki, $wgPutIPinRC, $wgRC2UDPAddress, $wgRC2UDPPrefix, $wgRC2UDPOmitBots; |
145 | 145 | $fname = 'RecentChange::save'; |
146 | 146 | |
147 | 147 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -176,7 +176,7 @@ |
177 | 177 | |
178 | 178 | # Notify external application via UDP |
179 | 179 | if ( $wgRC2UDPAddress && ( !$this->mAttribs['rc_bot'] || !$wgRC2UDPOmitBots ) ) { |
180 | | - self::sendToUDP( $this->getIRCLine() ); |
| 180 | + self::sendToUDP( $wgRC2UDPPrefix, $this->getIRCLine() ); |
181 | 181 | } |
182 | 182 | |
183 | 183 | # E-mail notifications |
— | — | @@ -209,13 +209,13 @@ |
210 | 210 | * Send some text to UDP |
211 | 211 | * @param string $line |
212 | 212 | */ |
213 | | - static function sendToUDP( $line ) { |
| 213 | + public static function sendToUDP( $prefix, $line ) { |
214 | 214 | global $wgRC2UDPAddress, $wgRC2UDPPort, $wgRC2UDPPrefix; |
215 | 215 | # Notify external application via UDP |
216 | 216 | if( $wgRC2UDPAddress ) { |
217 | 217 | $conn = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP ); |
218 | 218 | if( $conn ) { |
219 | | - $line = $wgRC2UDPPrefix . $line; |
| 219 | + $line = $prefix . $line; |
220 | 220 | socket_sendto( $conn, $line, strlen($line), 0, $wgRC2UDPAddress, $wgRC2UDPPort ); |
221 | 221 | socket_close( $conn ); |
222 | 222 | } |