]> git.sesse.net Git - remoteglot/commitdiff
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 4428e26ad4e4401a0f11b300322d5e458ef8bc13..b66fd2c43acec6f6a9db5703e06e1f42a3fc9d90 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.");
                }