Re: [dev] [sic] Specifying a channel

From: Moritz Wilhelmy <crap_AT_wzff.de>
Date: Wed, 9 Dec 2009 09:34:17 +0100

On Wed, Dec 09, 2009 at 07:07:55AM +0000, Anselm R Garbe wrote:
> 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
>
>

actually, it must be :m #suckless Good morning suckless or
:s #suckless
Good morning suckless ;)
(just that nobody gets confused why no messages appear...
one could automatically set the current channel on :j
though)
Received on Wed Dec 09 2009 - 08:34:17 UTC

This archive was generated by hypermail 2.2.0 : Wed Dec 09 2009 - 08:36:02 UTC