2010/05/07 (金)

2010-05-07:tircdを試してみる

そろそろまじめに(?) twitter を使ってみようということで、IRC gateway を入れてみた。
IRC サーバとしてデーモン起動して、ユーザーは IRC クライアントでつなぐと、みんなのつぶやきが IRC のふつうの発言っぽく表示され、自分の発言は twitter に自分のつぶやきとして登録される、というもの。

自分が試したのは tircd。http://code.google.com/p/tircd/

サーバ上に CPAN から必要なものを入れた上で、設定ファイル編集して、tircd.pl を実行すればよい。わりと簡単。

$ sudo cpan -i POE POE::Filter::IRCD Net::Twitter::Lite
$ tar xvzf tircd_v0.10.tgz
$ cd tircd/
$ cp tircd.cfg.example ~/.tircd
$ vi ~/.tircd
$ grep -v '^#' ../.tircd | grep .
address 127.0.0.1
port 6664
use_ssl 0
https_ca_dir
https_ca_file
storage_path /tmp/tircd
logtype file
logfile tircd.log
debug 0
update_timeline 180
update_directs 180
timeline_count 20
long_messages ignore
min_length 20
join_silent 0
filter_self 1
shorten_urls 1
convert_irc_replies 0
$ ./tircd.pl &

IRC クライアント上で /invite <USERNAME> すると、twitter 上の USERNAME の人をフォローするようになったりする。
なかなか面白いアイディアね。

comment