scripts

various script and utils
git clone git://z3bra.org/scripts
Log | Files | Refs

commit e44498c88afcf217ef06b947875212d782dc1809
parent abf21eb578b507c0235c8cfe209d7a374ed11135
Author: Willy Goiffon <w.goiffon@gmail.com>
Date:   Wed Jun 26 17:39:13 +0200

renamed + added channel as parameter

Diffstat:
chan | 30++++++++++++++++++++++++++++++
irc | 28----------------------------
2 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/chan b/chan @@ -0,0 +1,30 @@ +#!/usr/bin/bash + +## ii directory +ROOT=~/var/irc + +# irc parameters +NICK='amoureuse' +SERV='irc.freenode.net' +PORT='6667' +CHAN='z3bra' + +[[ -n "$1" ]] && CHAN=$1 + +# commands launched on startup +JOIN="/j $CHAN yop yop" + +# spawn ii +ii -i $ROOT -n $NICK -s $SERV -p $PORT & + +while [ ! -p $ROOT/$SERV/in ];do echo awaiting connection to $SERV...; sleep 2; done + +# launch commands at start +echo "$JOIN" > $ROOT/$SERV/in + +while [ ! -p $ROOT/$SERV/$CHAN/in ];do echo Starting chatting with $CHAN; sleep 1; done + +cd $ROOT/$SERV/$CHAN +tmux new-session -d -s irc 'tail -f out' \; split-window -l 1 'ptii' \; attach + +rm -rf $ROOT/$SERV diff --git a/irc b/irc @@ -1,28 +0,0 @@ -#!/usr/bin/bash - -## ii directory -ROOT=~/var/irc - -# irc parameters -NICK='amoureuse' -SERV='irc.freenode.net' -PORT='6667' -CHAN='z3bra' - -# commands launched on startup -JOIN="/j z3bra connected" - -# spawn ii -ii -i $ROOT -n $NICK -s $SERV -p $PORT & - -while [ ! -p $ROOT/$SERV/in ];do echo awaiting connection to $SERV...; sleep 2; done - -# launch commands at start -echo "$JOIN" > $ROOT/$SERV/in - -while [ ! -p $ROOT/$SERV/$CHAN/in ];do echo Starting chatting with $CHAN; sleep 1; done - -cd $ROOT/$SERV/$CHAN -tmux new-session -d -s irc 'tail -f out' \; split-window -l 1 'ptii' \; attach - -rm -rf $ROOT/$SERV