From: Steinar H. Gunderson Date: Sat, 15 Nov 2014 00:53:22 +0000 (+0100) Subject: Do observe after we have set up AnyEvent listening; otherwise, seemingly we can get... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=b3460eff1614aaa74a09a581f04edb8722c87667;p=remoteglot-book Do observe after we have set up AnyEvent listening; otherwise, seemingly we can get problems missing the initial line. --- diff --git a/remoteglot.pl b/remoteglot.pl index ec26401..5982eca 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -93,14 +93,6 @@ $t->cmd(""); $t->cmd("set shout 0"); $t->cmd("set seek 0"); $t->cmd("set style 12"); -if (defined($remoteglotconf::target)) { - if ($remoteglotconf::target =~ /^http:/) { - fetch_pgn($remoteglotconf::target); - } else { - $t->cmd("observe $remoteglotconf::target"); - } -} -print "FICS ready.\n"; my $ev1 = AnyEvent->io( fh => fileno($t), @@ -116,6 +108,15 @@ my $ev1 = AnyEvent->io( } } ); +if (defined($remoteglotconf::target)) { + if ($remoteglotconf::target =~ /^http:/) { + fetch_pgn($remoteglotconf::target); + } else { + $t->cmd("observe $remoteglotconf::target"); + } +} +print "FICS ready.\n"; + # Engine events have already been set up by Engine.pm. EV::run;