mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Hi all, how do i go about changing the colour of this so that the # of the channel is say a yellow colour or the status of someone in the room say ! or @ or + is a different colour too, instead of it being all green, i did have the source code for the channel part, but silly me lost it LOL

Here's what i got so far:-

raw 319:*: {
echo @Whois 14[11 Whois 14] $+ 8 -14 Channels:9 $sorttok($3-,32,c)
halt
}

maybe if my two options could be sent in two parts so i could decide which is the best one to keep incase i didnt like one of them.

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i'm sure there is a better way to do it but this is how i can help you .
Code:
  
RAW 319:*: {
  /set %319 $3- 
  if ( ~ isin %319 ) { set %319 $replace(319,~,12~04) }
  if ( $chr(35) isin %319 ) { set %319 $replace(%319,$chr(35),08#04) }
  /echo -a 12Channels:04 $+ %319 | halt
}




Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I changed the colours on how i wanted it to look but didn't seem to work as well as i thought, it only seems to work well if you are only in 1 channel, but if you are in more then 1 it doesn't sort the colour out too well

As you can see where the 9 is for the acutal channels it decides to colour your channel status in the same colour and not using the 8 one.

raw 319:*: {
/set %319 $3-
if ( ~ isin %319 ) { set %319 $replace(319,~,12~04) }
if ( $chr(35) isin %319 ) { set %319 $replace(%319,$chr(35),08#9) }
/echo -a 14Channels:11 $+ %319 | halt
}

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
not sure exactly what you mean but
$replace(%319,$chr(35),08#9) }
the 9 should be the same color as
:11 $+ %319 that way when it replaces the #with color yellow it goes back to color 11 afterwords

Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
But the modes like @, !, + are the same colour as the channel

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
the way i posted it originally it should echo out the channel name in red the # symbol in yellow and the ~ in blue when using $replace(%319,the symbol to change color of,color of symobol~color of channel name that way it changes the ~to blue then it changes back to what color you want the text .so if you are using color number 11 for channel name
$replace(%319,~,blue color~channelname color)

Code:
  
12Channels:0412~0408#04chanelname @08#04channelname &08#04channelname

above is from the original response Channels: is blue then we swith to red for channelnames blue for ~ and yellow for #
if you replace #with yellow# you ave to then switch back to red for channel names the last number in the $replace sequence should be the same as the color of the channel name ? if you mean that @ ! + are not changed thats because they havent been replaced yet only the ~ and # have been done as i wasnt sure what modes you were dealing with you just add a new line for each additional mode
if ( @ isin %319 ) { set %319 $replace(%319,@,12@04) }

Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I got the colour working ok now, but seems to be a bug in your coding somewhere, if there's a channel with numbers in it, say #100mp3 or something the colours seems to mess up badly.

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
when adding in your color codes make sure you use two numbers for example
04 = red
01 = black
08 = yellow


Link Copied to Clipboard