# Copyright (c) 2000,1 Martin Schulze # # 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; version 2 dated June, 1991. # # 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA. @color_high_list = [] @color_medium_list = [] # All colors # @boldwhite=00 @black=01 @blue=02 @green=03 @boldred=04 @red=05 @magenta=06 @yellow=07 @boldyellow=08 @boldgreen=09 @cyan=10 @boldcyan=11 @boldblue=12 @boldmagenta=13 @boldblack=14 @white=15 alias colon { # Colors # @color_normal=[$white] @color_system=[$boldblack] @color_medium=[$cyan] @color_msg=[$boldmagenta] @color_normal=[$white] @color_high=[$boldyellow] ^SET color on # In order not to screw up the display ^SET mangle_inbound BOLD,COLOR,REVERSE,UNDERLINE,BLINK # Gras @BLD=[] # Video inverse @IVT=[] # Souligne @UDL=[] # Couleur @COL=[] # Fin de couleur #@RST=[] # The original didn't work apparently, now reset it to white on black @RST=[$color_normal] ^ON ^MSG * echo \$_cmsg($0 $1-) ^ON ^SEND_MSG * echo \$_csmsg($0 $1-) ^ON ^PUBLIC * echo \$_cpublic($0 $1 $2-) ^ON ^PUBLIC_MSG * echo \$_cpublic($0 $1 $2-) ^ON ^PUBLIC_OTHER * echo \$_cpublic($0 $1 $2-) ^ON ^ACTION * echo \$_caction($0 $1 $2-) ^ON ^JOIN * echo \$_cjoin($0 $1) ^ON ^LEAVE * echo \$_cleave($0 $1) ^ON ^CHANNEL_NICK * echo \$_cnick($0 $1 $2) ^ON ^CHANNEL_SIGNOFF * echo \$_csignoff($0 $1 $2-) ^ASSIGN color ON echo *** Colors turned on } alias coloff { ^SET color on # In order not to screw up the display ^SET mangle_inbound BOLD,COLOR,REVERSE,UNDERLINE,BLINK # Gras @BLD=[] # Video inverse @IVT=[] # Souligne @UDL=[] # Couleur @COL=[] # Fin de couleur @RST=[] # Colors # @color_normal[] @color_medium[] @color_normal[] @color_high[] ^ASSIGN color ON echo *** Colors turned off } # ON [mode] [-|^] [action] # + Make event very noisy. It will display # everything it does. # - Make event quiet. It will not display any of # it's actions. # ^ Make event silent. Just like - above except it # inhibits the normal event display as well. The # only command that will cause output in this mode # is the ECHO command. This can be used to redefine # how event messages look. # Change only the forground colour alias _c { if ([$COL]) { ^assign FUNCTION_RETURN $COL$0$1-$RST } { # We must suppress the first argument and the space ^assign FUNCTION_RETURN $1- } } alias colshow { echo echo 00 : $_c(00 boldwhite) echo 01 : $_c(01 black) (black) echo 02 : $_c(02 blue) echo 03 : $_c(03 green) echo 04 : $_c(04 boldred) echo 05 : $_c(05 red) echo 06 : $_c(06 magenta) echo 07 : $_c(07 yellow) echo 08 : $_c(08 boldyellow) echo 09 : $_c(09 boldgreen) echo 10 : $_c(10 cyan) echo 11 : $_c(11 boldcyan) echo 12 : $_c(12 boldblue) echo 13 : $_c(13 boldmagenta) echo 14 : $_c(14 boldblack) echo 15 : $_c(15 white) } alias colhelp { echo colon - turn colors on echo colshow - display all colors echo coloff - turn colors off echo ch nick - highlight nickname echo cm nick - medlight nickname echo cl nick - don't med-/highlight nickname echo cls - show highlight list } alias cls { echo *** Current highlights: $color_high_list echo *** Current medlights: $color_medium_list } alias ch { if ([$0]) { @color_high_list = color_high_list ## [ $0] echo *** $0 added to highlights } { echo *** Error, call colhelp. } } alias cm { if ([$0]) { @color_medium_list = color_medium_list ## [ $0] echo *** $0 added to medlights } { echo *** Error, call colhelp. } } alias cl { if ([$0]) { @color_high_list = remove_from_list($0 $color_high_list) @color_medium_list = remove_from_list($0 $color_medium_list) echo *** $0 removed from med-/highlights } { echo *** Error, no number given, call colhelp. } } # $0 nickname of person who joined the channel # $1 channel alias _cjoin { ^assign host $userhost() if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN *** $_c($color_high $0) \($host\) has joined channel $1 } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN *** $_c($color_medium $0) \($host\) has joined channel $1 } { ^assign FUNCTION_RETURN $_c($color_system *** $0 \($host\) has joined channel $1) } } } # $0 nickname of person who left the channel # $1 channel alias _cleave { ^assign host $userhost() if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN *** $_c($color_high $0) \($host\) has left channel $1 } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN *** $_c($color_medium $0) \($host\) has left channel $1 } { ^assign FUNCTION_RETURN $_c($color_system *** $0 \($host\) has left channel $1) } } } # $0 The channel from which that person has changed nick # $1 Original nickname for that person # $2 New nickname for that person alias _cnick { ^assign host $userhost() # if (rmatch($1 $color_high_list) || rmatch($2 $color_high_list)) { if (rmatch($1 $color_high_list)) { ^assign FUNCTION_RETURN *** $_c($color_high $1) \($host\) is now known as $_c($color_high $2) @color_high_list = color_high_list ## [ $2] @color_high_list = remove_from_list($1 $color_high_list) } { if (rmatch($1 $color_medium_list)) { ^assign FUNCTION_RETURN *** $_c($color_medium $1) \($host\) is now known as $_c($color_medium $2) @color_medium_list = color_medium_list ## [ $2] @color_medium_list = remove_from_list($1 $color_medium_list) } { ^assign FUNCTION_RETURN $_c($color_system *** $1 \($host\) is now known as $2) } } } # $0 The channel from which the person signed off # $1 Nickname of person who left irc # $2- Text of Signoff message. alias _csignoff { ^assign host $userhost() if (rmatch($1 $color_high_list)) { if ([$2-]) { ^assign FUNCTION_RETURN *** $_c($color_high $1) \($host\) has left channel $0 \($2-\) } { ^assign FUNCTION_RETURN *** $_c($color_high $1) \($host\) has left channel $0 } } { if (rmatch($1 $color_medium_list)) { if ([$2-]) { ^assign FUNCTION_RETURN *** $_c($color_medium $1) \($host\) has left channel $0 \($2-\) } { ^assign FUNCTION_RETURN *** $_c($color_medium $1) \($host\) has left channel $0 } } { if ([$2-]) { ^assign FUNCTION_RETURN $_c($color_system *** $1 \($host\) has left channel $0 \($2-\)) } { ^assign FUNCTION_RETURN $_c($color_system *** $1 \($host\) has left channel $0) } } } } # $0 nickname of person who sent the message # $1- the message alias _cmsg { if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN *$_c($color_high $0)* $1- } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN *$_c($color_medium $0)* $1- } { ^assign FUNCTION_RETURN *$_c($color_msg $0)* $1- } } } # $0 nickname of person to which the message is sent # $1- the message alias _csmsg { if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN -> *$_c($color_high $0)* $1- } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN -> *$_c($color_medium $0)* $1- } { ^assign FUNCTION_RETURN -> *$_c($color_msg $0)* $1- } } } # $0 nickname of person who sent the message # $1 channel sent to # $2- the message alias _cpublic { # Problem: Messages in one window that is not the current will # be displayed with user#chan because $C doesn't contain # the channels one is on in that window. if (rmatch($0 $color_high_list)) { if ([$1] == [$C]) { ^assign FUNCTION_RETURN <$_c($color_high $0)> $2- } { ^assign FUNCTION_RETURN <$_c($color_high $0$1)> $2- } } { if (rmatch($0 $color_medium_list)) { if ([$1] == [$C]) { ^assign FUNCTION_RETURN <$_c($color_medium $0)> $2- } { ^assign FUNCTION_RETURN <$_c($color_medium $0$1)> $2- } } { if ([$1] == [$C]) { ^assign FUNCTION_RETURN <$0> $2- } { ^assign FUNCTION_RETURN <$0$1> $2- } } } } # $0 nickname of person who sent the message # $1 channel or nickname it is sent to # $2- the message alias _caction { if ([$1] == [$N]) { if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN >*$_c($color_high $0) $2- } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN >*$_c($color_medium $0) $2- } { ^assign FUNCTION_RETURN >* $_c($color_msg $0) $2- } } } { if (rmatch($0 $color_high_list)) { ^assign FUNCTION_RETURN * $_c($color_high $0) $2- } { if (rmatch($0 $color_medium_list)) { ^assign FUNCTION_RETURN * $_c($color_medium $0) $2- } { ^assign FUNCTION_RETURN * $0 $2- } } } } alias remove_from_list { if ([$1] > 0) { if ([$0] == [$1]) { @function_return = remove_from_list($0 $2-) } { @function_return = [$1 $remove_from_list($0 $2-)] } } }