hulk: IRC daemon.

[ bsd3, library, network, program ] [ Propose Tags ]

An IRC daemon with mandatory authentication.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.1, 0.1.2, 0.2.0
Dependencies base (>=4 && <5), cmdargs (>=0.6 && <0.7), ConfigFile (>=1.0 && <1.1), containers (>=0.3 && <0.4), Crypto (>=4.2 && <4.3), irc (>=0.4 && <0.5), mtl (>=1.1 && <1.2), network (>=2.2 && <2.4), split (>=0.1 && <0.2), time (>=1.1 && <1.2), unix (>=2.4 && <2.5), utf8-string (>=0.3 && <0.4) [details]
License BSD-3-Clause
Copyright 2010 Chris Done
Author Chris Done
Maintainer chrisdone@gmail.com
Category Network
Uploaded by ChrisDone at 2011-02-18T08:55:48Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables hulk-generate-pass, hulk
Downloads 2929 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-28 [all 6 reports]

Readme for hulk-0.1

[back to package description]

Hulk IRC Server Guide

Installation

From Hackage

$ cabal install hulk

From Github

$ git clone git://github.com/chrisdone/hulk.git
$ cd hulk
$ cabal install

Usage

Configuration

$ cp hulk.conf.example hulk.conf

You can edit the port, server name and MOTD file in here.

Auth

$ mkdir auth

Put a salt for your passwords in auth/passwd. For example:

$ head -c 128 /dev/random | sha1sum > auth/passwd-key

Then generate a password for your IRC user:

$ hulk-generate-pass -u demo -c=hulk.conf >> auth/passwd

(It will wait for a single line containing a pass and output the user and sha1 sum.)

Start the server

$ hulk -chulk.conf

Logs / events will be outputted to stdout. This will be a configuration option later. (Send me a patch if you already did this!)

Clients must connect with a password and user that matches the users and passwords in your auth/passwd file.

Using with SSL

You can use it with stunnel.

Change the port setting in hulk.conf:

port = 6666

Generate an SSL certificate:

$ openssl req -new -out hulk.pem -keyout hulk.pem -nodes -x509 -days 365

Make a stunnel.conf file:

pid = /path/to/wherever/stunnel.pid
client = no
foreground = yes
output = /dev/stdout
cert = hulk.pem
[hulk]
connect = 127.0.0.1:6666
accept = 6667

Then run it:

stunnel stunnel.conf

(It may be in /usr/sbin/stunnel depending on your system.)

Then run hulk:

hulk -chulk.conf

Logging

Hulk doesn't support specific channel logging yet, but you can use a logger bot.

$ cabal install hog
$ hog -h=127.0.0.1 --port=6666 -n=hog -u=hog --pass=mypassword --channels=#dev,#x -l/directory/of/logs -d5

-d5 is the timeout before reconnect.

Using an announcer bot

If you're using a private IRC server you're probably using it at a dev company, and you probably want to make announcements about commits, tickets, etc. from a feed.

You can use rss2irc. But you need a patched version which supports sending the PASS command:

$ git clone git://github.com/chrisdone/rss2irc.git
$ cd rss2irc
$ cabal install

Then run it:

$ rss2irc http://myserver/foo.atom announce@127.0.0.1/#dev \
  -p 6667 -i 1 -l  --pass myannouncepass

Utility for 'telling' people things externally

Sometimes you want automatic scripts to send notices to the IRC.

Save this script in tell.sh:

(cat /mypath/tell-login; echo "NICK $1"; echo "TELL $2 :$3") | nc serverip 6667 -w 1 > /dev/null

Run it like this:

$ tell announce '#dev' 'Stuff happened!'

And put this in your /mypath/tell-login:

$ cat /opt/hulk/tell-login
PASS mypassword
USER myuser * * *