Mercurial > hg > skillbot
comparison skillbot.pl @ 28:2964c53ca7eb
Fixes eta status after skill should have completed
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sat, 06 Dec 2008 23:34:36 +0000 |
parents | 708653f624f3 |
children | c25d5c1e7f28 |
comparison
equal
deleted
inserted
replaced
27:708653f624f3 | 28:2964c53ca7eb |
---|---|
228 if ($msg =~ /^\!eta(\s+(.+))?/i) { | 228 if ($msg =~ /^\!eta(\s+(.+))?/i) { |
229 my $found = 0; | 229 my $found = 0; |
230 for my $f (@friends) { | 230 for my $f (@friends) { |
231 if ((defined $2 && $f->{char}->name eq $2) | 231 if ((defined $2 && $f->{char}->name eq $2) |
232 || (!defined $2 && $f->{nick} eq $their_nick)) { | 232 || (!defined $2 && $f->{nick} eq $their_nick)) { |
233 my $text = (defined $f->{skill} | 233 my $text = ((defined $f->{skill} |
234 && $f->{skill}->finish_time > time()) | |
234 ? sprintf("Currently training %s (finish in %s)", | 235 ? sprintf("Currently training %s (finish in %s)", |
235 $f->{skill}->name, | 236 $f->{skill}->name, |
236 $f->{skill}->time_remaining) | 237 $f->{skill}->time_remaining) |
237 : "No skill currently training"); | 238 : "No skill currently training"); |
238 | 239 |