X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FIRC%2FMisc.pm;fp=ND%2FIRC%2FMisc.pm;h=2b479dd789e2a2ecf84c71a0bf590ffb7f08c237;hb=55cc621bec16d80555e9e588c731505a8b04e1a9;hp=0000000000000000000000000000000000000000;hpb=98378b594064426cdbc06b30a58553195d8cf8ec;p=ndwebbie.git diff --git a/ND/IRC/Misc.pm b/ND/IRC/Misc.pm new file mode 100644 index 0000000..2b479dd --- /dev/null +++ b/ND/IRC/Misc.pm @@ -0,0 +1,49 @@ +#************************************************************************** +# Copyright (C) 2006 by Michael Andreen * +# * +# This program is free software; you can redistribute it and/or modify * +# it under the terms of the GNU General Public License as published by * +# the Free Software Foundation; either version 2 of the License, or * +# (at your option) any later version. * +# * +# This program is distributed in the hope that it will be useful, * +# but WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# GNU General Public License for more details. * +# * +# You should have received a copy of the GNU General Public License * +# along with this program; if not, write to the * +# Free Software Foundation, Inc., * +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * +#**************************************************************************/ +package ND::IRC::Misc; +use strict; +use warnings; +require Exporter; + +our @ISA = qw/Exporter/; + +our @EXPORT = qw/valuecolor/; + +$ND::defchan = "#def-ndawn"; +$ND::memchan = "#nd"; +$ND::scanchan = "#ndef"; +$ND::bcchan = "#nd-day"; +$ND::intelchan = "#ndintel"; +$ND::officerchan = "#nd-officers"; +$ND::communitychan = "#ndawn"; +$ND::pubchan = "#newdawn"; +$ND::xanchan = "#ViolatorS"; + +sub valuecolor { + my $s = $_; + $s = $_[1] if defined $_[1]; + $s = "" unless defined $s; + return chr(3)."5$s".chr(3) if $s eq 'Hostile'; + return chr(3)."3$s".chr(3) if $s eq 'Friendly'; + return chr(3)."3$s".chr(3) if $s eq 'Nap' or $s eq 'NAP'; + return chr(2)."$s".chr(2) if $_[0]; + return $s; +} + +1;