サーバーに常駐させておきたいメモ。
CentOSだけど多分osxでもいけるはず。
twitter以外にもサーバーログを流したりしておきたいので準備。
gem install net-ircはやらない方向で。
# sudo yum install irssi # svn co http://svn.coderepos.org/share/lang/ruby/net-irc/trunk net-irc # svn co http://svn.coderepos.org/share/lang/perl/tiarra/trunk tiarra # sudo gem install xmpp4r-simple
tiarraの設定ファイルを編集する。
# cd tiarra
# cp sample.conf tiarra.conf
# vi tiarra.conf
62,64c62,64
< nick: tiarra
< user: tiarra
nick: ニックネーム
> user: ユーザーネーム
> name: 名前
92c92
tiarra-password: tiarra_password
103,104c103,104
< server-in-encoding: jis
server-in-encoding: utf8
> server-out-encoding: utf8
108,109c108,109
< client-in-encoding: jis
client-in-encoding: utf8
> client-out-encoding: utf8
213,214c213,215
< name: ircnet
#name: ircnet
> #name: 2ch
> name: twitter
836a838,847
> twitter {
> host: 127.0.0.1
> port: 16668
> name: twitter_account athack tid ratio=32:1 replies=6 maxlimit=70
> password: twitter_password
> in-encoding: utf8
> out-encoding: utf8
> }
>
irssiの初期設定をする。
# irssi
#> /set term_charset=UTF-8
#> /quit
# vi ~/.irssi/config
servers = (
{ address = "127.0.0.1"; chatnet = "TIA"; port = "6667"; password = "tiarraのパスワード"; }
);
chatnets = { TIA = { type = "IRC"; }; };
(中略)
settings = {
core = {
real_name = "なまえ";
user_name = "なまえ";
nick = "ニックネーム";
};
"fe-text" = { actlist_sort = "refnum"; };
"fe-common/core" = { term_charset = "UTF-8"; autolog = "yes"; };
};
localhostじゃなくて127.0.0.1にしてます。
tig.rbを起動する。
# cd ../net-irc # ruby examples/tig.rb -h 127.0.0.1 --debug
tiarraを起動する。
# cd ../tiarra # ./tiarra --debug
irssiを起動する。
# irssi #> /connect TIA
起動するときはscreenでやっておけば、どこからでもsshで接続してログをみることができます。
あとはサーバーログをながせるようにすればおk。
これはまたあとで。