X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Context.pm;h=5810ca4e97dc9cc369b2d6327e716d50ea67fd02;hb=82565659237ad7e2d279a19bac94d5d6a9335478;hp=8c16a95a65cdacc507cb06299e434f0727cb417d;hpb=8a4ea372a6296ecbd4f271c036aa5f2015e64c2a;p=NDIRC.git diff --git a/Context.pm b/Context.pm index 8c16a95..5810ca4 100644 --- a/Context.pm +++ b/Context.pm @@ -196,4 +196,16 @@ WHERE hostmask = $1 return -4; } +sub valuecolor { + shift @_; + my $s = $_; + $s = $_[1] if $#_ >= 1; + $s = "" unless defined $s; + return "$s" if $s eq 'Hostile'; + return "$s" if $s eq 'Friendly'; + return "$s" if $s eq 'Nap' or $s eq 'NAP'; + return "$s" if $_[0]; + return $s; +} + 1;