LoginSignup
0
0

More than 5 years have passed since last update.

znc-pushの設定メモ

Last updated at Posted at 2017-01-07

IRCのハイライト通知をSlackを使ってやりたいので、znc-pushを使った。
忘れそうなのでメモっておく。
※これでクライアント依存のハイライト通知から脱却

install

$ git clone https://github.com/jreese/znc-push.git
$ cd znc-push/
$ make && make install

補足

zncは、ログインできないユーザ(znc)で実行していたので、別のユーザでmakeした。
そのため、soファイルを移動させた。

$ sudo cp ~/.znc/modules/push.so /usr/lib/znc/.
$ sudo chmod 644 /usr/lib/znc/push.so

ロード

IRC上で以下のコマンドを実行して、pushモジュールをロードする。

/msg *status loadmod --type=user push

設定(Slack)

Slackに流したかったので、Slackの設定しか調べていない。

/msg *push set service slack
/msg *push set secret [SlackのAPIキー] ※URLではなく、Incoming WebhookのTから始まる文字列なので注意
/msg *push set target [SlackのChannel名]
/msg *push set hightlight [反応させたい文字列をスペース区切りで]

テスト

/msg *push send test

設定例

ソースコードを読めば、Slackの設定は大体分かる。
https://github.com/jreese/znc-push/blob/master/push.cpp#L610

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0