• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

chrisdone/hulk: Haskell IRC daemon.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

chrisdone/hulk

开源软件地址(OpenSource Url):

https://github.com/chrisdone/hulk

开源编程语言(OpenSource Language):

Haskell 100.0%

开源软件介绍(OpenSource Introduction):

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

See a complete example in the example/ directory in the root of the project. You can go into that directory and run hulk -chulk.conf to have an immediate server running on localhost port 6667.

Configuration

$ cp example/hulk.conf hulk.conf

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

Detailed instructions follow.

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 [email protected]/#dev \
  -p 6667 -i 1 -l  --pass myannouncepass



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
adomokos/haskell-katas: Simple Exercises in Haskell, using HSpec发布时间:2022-06-22
下一篇:
Gabriella439/Haskell-MMorph-Library: Monad morphisms发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap