Jump to content

small Q about this color


samooh_2003

Recommended Posts

i tried this to get the link in my script as web chat blue one with under line but i faced problem small one but i cant solve it with this so hope to find it here as usual

 

 

var %linkmessage $wildtok($1-,http://*,1,32) | echo -t # 8(-Owner-) 2 $nick $+ : $replace($1-,%linkmessage,12 %linkmessage )

 

 

 

i am using show users color and working pretty with me but with this one when some one paste any link the color becomes ok before the link and i got the link with underline and blue color but the next words after the link become black not the color for that user i tried it from mirc with normal words as

 

my name is sameh for ( name is ) with red color and after is i closed the red color then the my and sameh words back to my old color so any idea abt this plz ?!

 

 

sorry if i couldn't explain well :lolwave:

Link to comment
Share on other sites

Took me a while to find this again but I got there in the end:

alias url.find {
var %n = $wildtok($1-,http*,0,32), %i = 1, %e = $1-
while (%n >= %i) {
   var %x = $wildtok(%e,http*,%i,32)
   var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$left(%e,1) $+ $left(%e,2),$null)
   var %e = $replace(%e,%x,%y)
   inc %i
}
var %n = $wildtok(%e,www.*,0,32), %i = 1
while (%n >= %i) {
   var %x = $wildtok(%e,www.*,%i,32)
   var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$+ $left(%e,1) $+ $left(%e,2),$null)
   var %e = $replace(%e,%x,%y)
   inc %i
}
return %e
}

Hope this helps; it will colour the links and (if memory serves) retain the original formatting of the text.

Takaharu: This is a test for www.tg007.net URLs.

 

You would use it in a similar way to this:

on *:text:*:#:{ echo -a $url.find($1-) }

Edited by takaharu_
Link to comment
Share on other sites

Guest X-Fusion

You'll have to change the color in the actual alias ..

alias url.find {
var %n = $wildtok($1-,http*,0,32), %i = 1, %e = $1-
while (%n >= %i) {
   var %x = $wildtok(%e,http*,%i,32)
   var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$left(%e,1) $+ $left(%e,2),$null)
   var %e = $replace(%e,%x,%y)
   inc %i
}
var %n = $wildtok(%e,www.*,0,32), %i = 1
while (%n >= %i) {
   var %x = $wildtok(%e,www.*,%i,32)
   var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$+ $left(%e,1) $+ $left(%e,2),$null)
   var %e = $replace(%e,%x,%y)
   inc %i
}
return 12 $+ %e $+ 
}

Something like that might work. I dunno, its 9:00 am, I just got home from work, and I'm tired.

Link to comment
Share on other sites

Guest X-Fusion
Well, why would you use echo -a? That would echo any text to your active channel. What if you were in 4 rooms? Try echo $chan. And, if you have another theme, implement it into that. That might be your problem ..
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...