Skip to content
General IRCd

small Q about this color

A TG007 community discussion started by samooh_2003.

Discussion 12 posts
Page 1 of 1
Open
Topic #7622 · 12 published posts · 3,793 views

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:

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 Oct 31, 2006 10:24 AM by takaharu_

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.

thx alot for u takaharu_ but the same ,this time i got the words after da link with white color not black only :lmaojump: so hope to know wt this may be from , thx again for u waittin reply from u or from anyone can help

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.

:oops: not working

No more ideas ? <wo0t>

I tried out the code I posted just to make sure:

//echo -a 4Testing for www.TG007.net URLs.

It worked fine; all of the text was red apart from the URL, which was blue and underlined.

Edited Nov 1, 2006 11:04 PM by takaharu_

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.

Just tried it to, works fine for me. Maybe your not echoing right?

ok now if some one type a link in the room i should make it lik this

 

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

 

??

Edited Nov 2, 2006 5:34 PM by samooh_2003
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 ..

i tested it with this only and the same

 

on ^*:TEXT:*:#: {
  echo # $nick : $url.find($1-)
  haltdef
}

 

 

before the link the font is normal after the link black one

Forgive me for resurrecting an old thread, but that alias is quite neat, and though I never plan on releasing any scripts, in case I distributed it to any friends and they shared it around I'd like to give credit where it is due.

 

In a long winded way I was in fact asking if anyone knows who's snippet that belongs to?