goingnuts wrote:technosaurus: Any possibility to have a print out of own input in ashirc as well? (Would be nice to have...)
Code: Select all
#!/bin/sh
[ -x /etc/DISTRO_SPECS ] && . /etc/DISTRO_SPECS
[ $1 ] && USER=$1 || USER=${DISTRO_FILE_PREFIX:-ashircuser}${DISTRO_VERSION}${DISTRO_MINOR_VERSION}user-$RANDOM
echo starting irc > $HOME/irc/log
eval `Xdialog --stdout --separator " " --3inputsbox "setup" 0 0 "USER=" "$USER" "SERVER=" "irc.freenode.net" "CHANNEL=" "#puppylinux" \
|while read USER SERVER CHANNEL; do echo SERVER="$SERVER" USER="$USER" CHANNEL="$CHANNEL";break;done`
Xdialog --title "#puppylinux irc" --tailbox $HOME/irc/log 30 99 &
XDPID=$!
A='NICK '$USER'
USER '$USER' +iw '$USER' :ashirc
JOIN '$CHANNEL' '$USER
while ([ "$A" ]) do echo "$A"
A=`Xdialog --timeout 200 --stdout --title "AshIRC message dialog" --inputbox "Enter an IRC message for #puppylinux" 0 0`
case $? in
255)A=PONG;;
1)kill $XDPID;;
0)echo $USER:$A >> $HOME/irc/log;A='PRIVMSG '"$CHANNEL"' :'"$A"'.';;
esac
done | telnet $SERVER 6667 | while read LINE; do echo ${LINE%%!*}:${LINE#:*:};done>> $HOME/irc/log
Edit: ok its done but ugly ... will clean it up when it bothers me ... still trying to get around the ping ... pong every 200+ seconds ... maybe fork a while : do sleep 200 echo PONG and kill it with all status changes? ... wait better to fork the dialog and just do a continue (need to see if that works ... can you break/continue from within a loop from a process forked from it?)
X11vnc?
http://www.karlrunge.com/x11vnc/
(it has a lot of "extra" options too, but as far as gui toolkits, it uses x11 AFAICT)