IRCD
m (HAGGER?????????????????????????????????????? moved to IRCD over redirect) |
(→pmtpa) |
||
| Line 3: | Line 3: | ||
==pmtpa== | ==pmtpa== | ||
| − | We use a patched version of ircd-hybrid, running on browne. It can be started with: | + | We use a patched version of ircd-ratbox (a fork of ircd-hybrid), running on browne. It can be started with: |
| − | :<tt>su -c /usr/local/ircd- | + | :<tt>su -c /usr/local/ircd-ratbox/bin/ircd ircd</tt> |
There's no need to run it in the background, it forks automatically. The RC bot works as follows: | There's no need to run it in the background, it forks automatically. The RC bot works as follows: | ||
| Line 14: | Line 14: | ||
* mxircecho.py connects to the local ircd. The oper password is inside mxircecho.py, so don't check it in to CVS. It's restricted by hostname so it's not a huge issue, it's just the principle of the thing. | * mxircecho.py connects to the local ircd. The oper password is inside mxircecho.py, so don't check it in to CVS. It's restricted by hostname so it's not a huge issue, it's just the principle of the thing. | ||
| − | The ircd source tree is in /home/wikipedia/src/ircd- | + | The ircd source tree is in /home/wikipedia/src/ircd-ratbox/ircd-ratbox-2.2.8-notalk . |
| − | : [http://svn.wikimedia.org/viewvc/mediawiki/trunk/tools/irc/ircd- | + | : [http://svn.wikimedia.org/viewvc/mediawiki/trunk/tools/irc/ircd-ratbox-notalk.patch?view=markup ircd-ratbox-notalk.patch in our SVN] |
The configure line is: | The configure line is: | ||
| − | :<tt>./configure -- | + | :<tt>./configure --enable-services --with-nicklen=50 --with-topiclen=300 --prefix=/usr/local/ircd-ratbox</tt> |
| − | IRCD can be configured at runtime by changing /usr/local/ircd- | + | IRCD can be configured at runtime by changing /usr/local/ircd-ratbox/etc/ircd.conf and either restarting or sending the "rehash" command when logged in as an oper. Restarting has the disadvantage of disconnecting everyone, resetting the channel list, and possibly crashing mxircecho.py. Rehashing sometimes causes ircd to lock up with 100% CPU, requiring a restart. |
| − | Documentation for ircd- | + | Documentation for ircd-ratbox is poor. The best source for information about ircd.conf is apparently etc/example.conf. Some configuration variables can be changed by opers using /set. Quite a lot of server information is available with /stats. Documentation for oper commands is available with /help (/raw help in mIRC). |
==How to do it on your own server== | ==How to do it on your own server== | ||
Revision as of 22:54, 16 June 2009
This page discusses IRC notification for recent changes on Wikimedia wikis, with a particular focus on the setup of the server at irc.wikimedia.org. A simplified method for setting up IRC notification for your own MediaWiki installation is also given.
pmtpa
We use a patched version of ircd-ratbox (a fork of ircd-hybrid), running on browne. It can be started with:
- su -c /usr/local/ircd-ratbox/bin/ircd ircd
There's no need to run it in the background, it forks automatically. The RC bot works as follows:
- RecentChange::save() sends UDP packets to browne. The data sent is IRC-ready, and prefixed with the channel name as specified by $wgRC2UDPPrefix (in InitialiseSettings.php)
- udprec, currently running as tstarling in a screen on browne, picks up the packets and pipes them into mxircecho.py. This service can be started with:
- /home/wikipedia/bin/start-ircbot
- mxircecho.py connects to the local ircd. The oper password is inside mxircecho.py, so don't check it in to CVS. It's restricted by hostname so it's not a huge issue, it's just the principle of the thing.
The ircd source tree is in /home/wikipedia/src/ircd-ratbox/ircd-ratbox-2.2.8-notalk .
The configure line is:
- ./configure --enable-services --with-nicklen=50 --with-topiclen=300 --prefix=/usr/local/ircd-ratbox
IRCD can be configured at runtime by changing /usr/local/ircd-ratbox/etc/ircd.conf and either restarting or sending the "rehash" command when logged in as an oper. Restarting has the disadvantage of disconnecting everyone, resetting the channel list, and possibly crashing mxircecho.py. Rehashing sometimes causes ircd to lock up with 100% CPU, requiring a restart.
Documentation for ircd-ratbox is poor. The best source for information about ircd.conf is apparently etc/example.conf. Some configuration variables can be changed by opers using /set. Quite a lot of server information is available with /stats. Documentation for oper commands is available with /help (/raw help in mIRC).
How to do it on your own server
We get a lot of questions on how to set up IRC notification for non-Wikimedia wikis. Here is the procedure. You need two programs:
- Some simple IRC client such as ircII with the -d switch.
- A netcat which supports UDP receive, such as GNU netcat
Put this in your LocalSettings.php:
$wgRC2UDPAddress = '127.0.0.1'; # the host where the IRC client is running $wgRC2UDPPort = 9390; # or whatever $wgRC2UDPPrefix = '';
Now start your IRC client. Here's the command line for the above suggested configuration:
netcat -ulp 9390 | irc -d -c \#channelname nickname irc.example.com &
For multiple wikis, I suggest you use a different port number for each one, and a separate IRC connection. This should be OK for up to about 10 wikis. Wikimedia uses a more complex setup to multiplex IRC connections, but this should be unnecessary for small installations.