Mercurial > hg > skillbot
changeset 37:5900a37101eb
Bold names in !next
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sun, 07 Dec 2008 11:40:11 +0000 |
parents | 6baa10b255ae |
children | a8b60d2968b2 |
files | skillbot.pl |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/skillbot.pl Sun Dec 07 11:37:53 2008 +0000 +++ b/skillbot.pl Sun Dec 07 11:40:11 2008 +0000 @@ -251,18 +251,19 @@ } # force update/reload of the friends/training data - if ($msg =~ /^\!update/i) { + elsif ($msg =~ /^\!update/i) { update_friends($self); check_training($self); $self->privmsg('#' . $config{channel}, "Done"); } # lists the chars in order of shortest training time - if ($msg =~ /^\!next/i) { + elsif ($msg =~ /^\!next/i) { my $nreply = "Training: "; for my $f (sort { $a->{skill}->finish_time <=> $b->{skill}->finish_time } grep(defined $_->{skill}, @friends)) { - $nreply .= $f->{char}->name . " (" . $f->{skill}->time_remaining . ") | "; + $nreply .= sprintf("\002%s\002 (%s) | ", + $f->{char}->name, $f->{skill}->time_remaining); } $self->privmsg('#' . $config{channel}, substr($nreply, 0, -3));