[CBLX] petite question IRC

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


Bonjour. 

Je fais partie du groupe / de la communauté Resonance MAO consacré à la
recherche autour du son, de la musique etc, en relation avec la MAO -
musique assistée par ordinateur, mais orienté Logiciels Libres. 
Du coup j'essaye de participer au salon chat #resonance-irc sur irc.libera.chat,
j'ai donc resorti un tout vieux script Bash fait il y a (trop) longtemps; 
mais ça ne marche pas/plus, et bizarrement il me renvoit après mes choix au 
début de la boucle / du menu, alors que je ne vois aucun msg d'erreur.
(J'ai essayé avec ou sans le "#" devant resonance-irc, sans effet).  

Qq'un aurait-il + d'inspiration, voici le script : 

##### 
 
#!/bin/bash
# ..... 

# Just put this in your /usr/local/bin dir and run the "bxm" script when
# connected to the Internet.

# Personalize bxm by creating a ~/.ircrc file with preferences.
# If the rc file does not exist, it will be created now...
RC=".ircrc"
rm ~/$RC
# The next 2 lines are set by default; you may recomment them if they
# doesn't match with your personal preferences...:
echo "sleep 7">~/$RC
echo "/toggle log">>~/$RC
# Note: ~/.ircrc is deleted/created after each session.

BX="ircii"
#BX="irc"
# (or irssi / bitchx ...) 

NA="hohooh"
NB="eeeteee"
NC="blablaaah"
#ND=""
#NE=""

SA="irc.libera.chat"
SB="irc.kewl.org"
SC="another.irc.channel"

# 
function F1 ()
{
echo "BXM - BitchX/IRC/IRCII/IRSSI Menu"

echo 
echo Using ~/$RC with settings:
cat ~/$RC
echo 
echo "Select your nickname: "

cat << EOF
  [1]: $NA
  [2]: $NB
  [3]: $NC
  [0]: Quit
EOF

echo 
echo -ne "\a"
read -p "Select nickname (ctrl+c / 0=quit): " NN

case "$NN" in
	1) Nick=$NA ;;
	2) Nick=$NB ;;
	3) Nick=$NC ;;
	*) clear && echo "Goodbye!" && exit 1 ;;
esac

#clear

#echo "BXM - BitchX/IRC/IRCII/IRSSI Menu"

echo 
echo "Select a chat server: "

cat << EOF
  [1]: $SA
  [2]: $SB
  [3]: $SC
  [0]: Quit
EOF

echo 
echo -ne "\a"
read -p "Select chat server (ctrl+c / 0=quit): " CS

case "$CS" in
	1) Srv=$SA ;;
	2) Srv=$SB ;;
	3) Srv=$SC ;;
	*) clear && echo "Goodbye!" && exit 1 ;;
esac

#clear

echo  
read -p "Specify a port if necessary: " PX

echo  
read -p "Specify the chatroom if necessary: " RX

setleds -num
clear
if test -z "$RX"
then
if test -z "$PX"
then
$BX $Nick $Srv
exec $0
else
$BX $Nick $Srv:$PX
exec $0
fi
else
if test -z "$PX"
then
rm ~/IrcLog
$BX $Nick $Srv -c \#$RX -l ~/$RC
exec $0
else
rm ~/IrcLog
$BX $Nick $Srv:$PX -c \#$RX -l ~/$RC
exec $0
fi
fi
}
function F2 ()
{
rm ~/.IrcLog.bak
mv ~/.IrcLog ~/.IrcLog.bak
head -3 ~/IrcLog >~/IrcLog.tmp
#head -1 ~/IrcLog >~/IrcLog.tmp
grep "<*>" ~/IrcLog >>~/IrcLog.tmp
tail -1 ~/IrcLog >>~/IrcLog.tmp
mv ~/IrcLog ~/.IrcLog
mv ~/IrcLog.tmp ~/IrcLog
#less ~/IrcLog
#links ~/IrcLog
lynx ~/IrcLog
#more ~/IrcLog
exec $0
}

clear

setleds +num

echo Running BXM... 
read -p"1)Chat or 2)review previous conversation (/leave blank to exit): " CHX
clear
test -z "$CHX" && clear && echo Nothing to do... Quiting! && exit 
F$CHX

# end of script

##### 

@+
Aldo. 


-- 
   CBLX - CarrefourBLinuX MailingListe 
   Pour obtenir de l'aide, envoyez le sujet  help  à: 
   carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
   Archives: 
   http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux
   ou 
   http://www.mail-archive.com/carrefourblinux@xxxxxxxxxxxxxxxxxxx/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/