mIRC Home    About    Download    Register    News    Help

Print Thread
Hyperlink using mIRC scripting #232564 09/06/11 04:06 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
This'll look like HTML, but maybe some users find it usefull, or maybe not (spam).

With HTML you've got <a href="linkhere">word to link here</a>.
How about if mIRC had something like that?

$link(linkhere,wordtolinkhere).

$link(http://www.mirc.com,visit the mIRC website!) should output <+Name> visit the mIRC website

which would be clickable (and perhaps an underline or color, which we'll be able to change by ourselfs with the mIRC Colors (icon in menu).


I think this'll be usefull for bots who spam a lot (schoutcasts maybe?) and people who don't want to see spam. This'll hide the spam.

Maybe it'll be usefull, maybe not because with this there is no way you can kick someone for spamming, because the person did not say 'http://www...' etc, but said a word or a line.

Or mIRC should have a feature with mIRC Scripting so we can check if $1- had a $link() in it.

Maybe?


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: Hyperlink using mIRC scripting [Re: DuXxXieJ] #232575 09/06/11 06:06 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As long as mIRC has text logging, using HTML style links instead of just typing the link out in chat would cause problems trying to view any links in your log files. Also, I think the majority of people spamming links are not going to use anything other than typing the link out, so I'm not sure if that's going to help anything.

If you want to check for links and potentially hide them or color/underline them, you can already do that in mIRC's scripting. You will need to catch the link --- there are a few posts on this forum that give you a regex that will catch most links, but you'd have to search for them unless someone can write one up again for you. And you will need to then do whatever you want to it... to hide it, halt the normal text and echo the text without that link; to color it, halt the normal text and echo it back with color codes around it; to underline it, halt the normal text and echo it back with underline codes around it; etc.

You can even use a combination of those to replace the link with a word (such as just LINK) if you want to show that there was a link, but not display it in the channel. The thing about doing that is that you will need to have some extra scripting to make it possible to click that "hidden" link if you want to be able to open links like that. You'd have to store the actual link and track where it is on the channel... a real pain to script, but possible. The rest is very easy.


Invision Support
#Invision on irc.irchighway.net