# HG changeset patch # User Dominic Cleal # Date 1258806688 0 # Node ID 962dada7587ec398aba641b28d0744c9ad1b1f7a # Parent 27f9196fd61078938c0c2a4499780ee2dec0ecfb Reset timer when the finish time has changed for the same skill diff -r 27f9196fd610 -r 962dada7587e skillbot.pl --- a/skillbot.pl Sat Feb 21 01:03:33 2009 +0000 +++ b/skillbot.pl Sat Nov 21 12:31:28 2009 +0000 @@ -510,14 +510,12 @@ # Check for changes in the skill, skip or cancel announcement if (defined $f->{skill}) { - # If the skill's the same, update the times - if ($skill->id eq $f->{skill}) - { - $f->{skill_finish} = $skill->finish_time; - return; - } - - # Skill has changed, delet previous announcement + # If the skill's the same, check the finish time and skip if + # nothing's changed + return if ($skill->id eq $f->{skill} + && $f{$f->{skill_finish} == $skill->finish_time); + + # Skill or finish time has changed, delete previous announcement del_one_shot_timer($f->{timer}); delete $f->{timer}; }