From 1c71b23985ace088dd8fa01001521c3844a14c40 Mon Sep 17 00:00:00 2001 From: yorhel Date: Thu, 14 Aug 2008 21:52:54 +0000 Subject: Fixed bug with an edit being comitted without any changes, renamed anime check command and added small but useful note to multi.pl git-svn-id: svn://vndb.org/vndb@85 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b --- lib/Multi/Anime.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Multi') diff --git a/lib/Multi/Anime.pm b/lib/Multi/Anime.pm index 6f329bd5..42bd52bf 100644 --- a/lib/Multi/Anime.pm +++ b/lib/Multi/Anime.pm @@ -36,7 +36,7 @@ sub spawn { # This module -only- fetches anime information in daemon mode! # Calling the anime command with an ID as argument will force # the information to be refreshed. This is not recommended, - # just use 'anime check' for normal usage. + # just use 'anime' for normal usage. my $p = shift; POE::Session->create( @@ -81,10 +81,10 @@ sub spawn { sub _start { $_[KERNEL]->alias_set('anime'); - $_[KERNEL]->call(core => register => qr/^anime ([0-9]+|check)$/, 'cmd_anime'); + $_[KERNEL]->call(core => register => qr/^anime(?: ([0-9]+))?$/, 'cmd_anime'); # check for anime twice a day - $_[KERNEL]->post(core => addcron => '0 0,12 * * *', 'anime check'); + $_[KERNEL]->post(core => addcron => '0 0,12 * * *', 'anime'); $_[KERNEL]->sig('shutdown' => 'shutdown'); if(!$Multi::DAEMONIZE) { @@ -110,7 +110,7 @@ sub shutdown { sub cmd_anime { # cmd, arg my @push; - if($_[ARG1] eq 'check') { + if(!$_[ARG1]) { # only animes we have never fetched, or haven't been updated for a month my $q = $Multi::SQL->prepare(q| SELECT id -- cgit v1.2.3