# HG changeset patch # User Dominic Cleal # Date 1228661383 0 # Node ID 4dd6009b0d2a35cf255fe52614caf43dc33fae9e # Parent a8b60d2968b2774f42e806c5492c19424becb751 Deleting timer ID if it's already been cancelled diff -r a8b60d2968b2 -r 4dd6009b0d2a skillbot.pl --- a/skillbot.pl Sun Dec 07 11:52:44 2008 +0000 +++ b/skillbot.pl Sun Dec 07 14:49:43 2008 +0000 @@ -462,14 +462,19 @@ { # If the char was training before and now has stopped then cancel # the announcement - del_one_shot_timer($f->{timer}) if defined $f->{timer}; + if defined $f->{timer} { + del_one_shot_timer($f->{timer}); + delete $f->{timer}; + } return; } # Check for changes in the skill, skip or cancel announcement if (defined $f->{skill}) { return if $skill->id eq $f->{skill}->id; + del_one_shot_timer($f->{timer}); + delete $f->{timer}; } my $finish = $skill->finish_time - time();