]> git.sesse.net Git - remoteglot/blobdiff - remoteglot.pl
Add a quit ocmmand, for easier profiling.
[remoteglot] / remoteglot.pl
index 4428e26ad4e4401a0f11b300322d5e458ef8bc13..b248d5f74b1568f162b3b5685d0d3a739243991c 100755 (executable)
@@ -177,6 +177,12 @@ sub handle_fics {
                        AnyEvent::HTTP::http_get($url, sub {
                                handle_pgn(@_, $url);
                        });
+               } elsif ($msg =~ /^stoppgn$/) {
+                       $t->cmd("tell $who Stopping poll.");
+                       $http_timer = undef;
+               } elsif ($msg =~ /^quit$/) {
+                       $t->cmd("tell $who Bye bye.");
+                       exit;
                } else {
                        $t->cmd("tell $who Couldn't understand '$msg', sorry.");
                }