Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: handling ICC timeout

Author: Dieter Buerssner

Date: 14:46:18 04/16/01

Go up one level in this thread


I have never tried this, but I had remembered reading the following from the
faq.htm of the Xboard/Winboard distribution. I have suggested this to an
operator on FICS, who had problems with disconnections (not because of auto
logout), and he told, that it seems to work fine.

Good luck,
Dieter

[B.23] Can I get Zippy to automatically reconnect to ICS when its connection
breaks?
There isn't a perfect solution to this problem yet, but a pretty good one is to
write a shell script (for xboard) or .bat script (for WinBoard) that
automatically restarts the program whenever it exits. Use the -xexit flag so
that you don't get a popup dialog that must be dismissed with the OK button
before the program will exit. The gap in this solution is that your connection
to ICS can sometimes get into a state where the program does not notice that the
connection is broken until the next time it tries to send a command. Perhaps
some future version of xboard/WinBoard will have an option to send a harmless
command every five minutes or so.

Anyway, here is a sample Windows .bat file that restarts WinBoard each time it
exits. Thanks to Jason Williamson. It assumes that you have put your computer
account's name and password in a file named logon.ini.

REM --
REM -- wbrecon.bat
REM -- Start WinBoard in Zippy mode, and restart it each time it exits.
REM -- Add or change parameters as needed for your application.
REM --
:loop
start /w winboard /zp /ics /icslogon logon.ini /xexit /xautoraise
REM -- The next line is to have a short delay setup for 139 seconds.
TYPE NUL | CHOICE.COM /N /CY /TY,99 >NUL
goto loop

Here is a Unix shell script to do the same thing for xboard. It's a bit more
elaborate. It is based on the script I use for the original Zippy. It logs all
ICS output to a file named zippy.out, and it lets you type commands to Zippy by
running "cat > zippy.fifo".

#! /bin/sh
host="204.178.125.65 -icsport 5000 -telnet -telnetProgram timestamp"
#host="164.58.253.13 -icsport 5000 -telnet -telnetProgram timeseal"
out=zippy.out
fifo=zippy.fifo
ZIPPYPASSWORD='something'
export ZIPPYPASSWORD
ZIPPYPASSWORD2='orother'
export ZIPPYPASSWORD2
ZIPPYLINES=`pwd`/all.lines
export ZIPPYLINES
ZIPPYGAMEEND='say Yow, that was FUN!
gameend'
export ZIPPYGAMEEND
zippylogon=`pwd`/logon.ini
DISPLAY=`hostname`:0.0
export DISPLAY
mv -f $out ${out}.old
rm -f $fifo
mkfifo $fifo
pid=$$
( while [ true ] ; do cat -u $fifo ; done ) | \
      ( while [ true ] ; do
          xboard -iconic -ics -icshost $host \
                 -zt -zp -xbell -xanimate \
                 -xautosave -xquiet -fcp "gnuchessx -h" \
                 -icslogon $zippylogon -xexit -autoflag -xautoraise $*
          sleep 600
        done ) > $out 2>&1 &




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.