Jump to content

IRCD

From Wikitech
Revision as of 08:01, 9 May 2005 by Tim (talk | contribs) (documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

We use a patched version of ircd-hybrid, running on browne. It can be started with:

su -c /usr/local/ircd-hybrid/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 line is IRC-ready, and prefixed with the channel name as specified by $wgUDP2IRCPrefix (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:
    ~jeronim/bin/udprec 9390 | /home/wikipedia/common/php-1.4/irc/mxircecho.py rc localhost
  • 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-hybrid/ircd-hybrid-7.0.3-patched . The configure line is:

./configure --prefix=/usr/local/ircd-hybrid

IRCD can be configured at runtime by changing /usr/local/ircd-hybrid/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-hybrid 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).