From 1525a5eef77d7993eecc4f901821adf4c30e6586 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 16 Jan 2011 09:43:21 +0100 Subject: Honour -C in all cases --- bin/icli | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/icli b/bin/icli index 4ea6716..6765bfb 100755 --- a/bin/icli +++ b/bin/icli @@ -98,16 +98,16 @@ sub pretty_duration { sub pretty_noyes { my ($bool) = @_; return ($bool ? - colored('YES', 'white on_red') : - colored('NO', 'black on_green') + with_colour('YES', 'white on_red') : + with_colour('NO', 'black on_green') ); } sub pretty_yesno { my ($bool) = @_; return ($bool ? - colored('YES', 'black on_green') : - colored('NO', 'white on_red') + with_colour('YES', 'black on_green') : + with_colour('NO', 'white on_red') ); } @@ -610,7 +610,8 @@ sub display_service { $flags .= '!'; } - printf(" %s%-3s%s", color('bold'), $flags, color('reset')); + $flags = sprintf(" %-3s", $flags); + print with_colour($flags, 'bold'); } printf(" %s" , service_state($s->{'has_been_checked'}, $s->{'current_state'})); @@ -647,10 +648,10 @@ sub display_host_services { print q{ }; } if ($h->{'current_state'} == 1) { - print colored('DOWN', 'white on_red'); + print with_colour('DOWN', 'white on_red'); } elsif ($h->{'current_state'} == 2) { - print colored('UNREACHABLE', 'white on_blue'); + print with_colour('UNREACHABLE', 'white on_blue'); } print "\n"; -- cgit v1.2.3