2009/12/8 Frederik Caulier <aed...@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

Reply via email to