Re: [dev] [sic] Specifying a channel

From: Anselm R Garbe <anselm_AT_garbe.us>
Date: Wed, 9 Dec 2009 07:07:55 +0000

2009/12/8 Frederik Caulier <aediks_AT_gmail.com>:
> Is there a way to make sic connect to a certain IRC channel by
> specifying it on the command line?
>
> Example:
>
> $ sic -h irc.oftc.net -c <#channel>
>
> Having such a functionality available would really make it easier to
> use sic in scripts or startup configurations.
>
> In my case I want to execute sic on startup in tmux or screen, but I
> always have to manually connect it to specific channels. Doing this
> once with a single sic session is no problem, but when you have to do
> this with five or six separate sessions each with another channel (as
> I use one sic per channel) on each startup this becomes quite annoying
> over time.

Create a fifo and write a shell script that loops over reading from
this fifo and pipes it into sic's stdin.

Something like

mkfifo channel_in

while cat channel_in
do
  :
done | sic -h irc.oftc.net -n logger > channel_out.log

And then you send commands or input to sic like this:

echo :j #suckless > channel_in
echo Good morning suckless > channel_in

Cheers,
Anselm
Received on Wed Dec 09 2009 - 07:07:55 UTC

This archive was generated by hypermail 2.2.0 : Wed Dec 09 2009 - 07:12:02 UTC