Add a command to stop the polling.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 6 Aug 2014 21:44:42 +0000 (23:44 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 6 Aug 2014 21:44:42 +0000 (23:44 +0200)
remoteglot.pl

index 4428e26..b66fd2c 100755 (executable)
@@ -177,6 +177,9 @@ sub handle_fics {
                        AnyEvent::HTTP::http_get($url, sub {
                                handle_pgn(@_, $url);
                        });
+               } elsif ($msg =~ /^stoppgn$/) {
+                       $t->cmd("tell $who Stopping poll.");
+                       $http_timer = undef;
                } else {
                        $t->cmd("tell $who Couldn't understand '$msg', sorry.");
                }