Page MenuHomeDevCentral

Edit stream for Wolfplex
Open, Needs TriagePublic

Description

Old configuration

This configuration isn't valid since MediaWiki 1.24.

// IRC

$wgRC2UDPAddress = 'localhost';
$wgRC2UDPPort = 8675;
$wgRC2UDPPrefix = '';

New configuration

Here the example given on MediaWiki for the new configuration:

$wgRCFeeds['example'] = [
	'class' => UDPRCFeedEngine::class,
	'uri' => 'udp://localhost:1336',
	'formatter' => JSONRCFeedFormatter::class,
	'omit_bots' => true,
];

For IRC bot, instead of letting the bot convert the JSON, we can even have the message ready, with colors:

'wgRCFeeds' => [
  ['libera'] = [
    'class' => UDPRCFeedEngine::class,
    'uri' => "udp://$_ENV[WOLFPLEX_STREAM_UDP_URI]",
    'formatter' => 'IRCColourfulRCFeedFormatter',
    'add_interwiki_prefix' => false,
    'omit_bots' => true,
  ],
],

Reference:

Salt

I'd suggest to configure it through Salt:
{{ nasqueron_services['viperserv'] }}:8675 to get 172.27.27.33:8675

The key viperserv needs to be added to pillar/services/table.sls

Event Timeline

WithLog::getLoggerConfiguration() provides the logger configuration.

The MonologSpi scope is different: it allows to send through UDP logs about what happens on MediaWiki, ie MediaWiki behavior or errors.

New documentation is available at https://www.mediawiki.org/wiki/Manual:$wgRCFeeds.

It requires the sockets extension, available per T1800 / D2892.