$deurl - Detect URL

By h3lp on May 17, 2005

$deurl(text-to-check)


This is a simple snippet from me, to detect a valid url. it didn't check if it is really valid/avaiable, it just check if the url is an address. This is good for channel advertising protection.

How To Use It??


on :text::#:{ if ($deurl($1-)) { echo -s $v1 } }
or
on @:text::#:{ if ($deurl($1-)) { kick # $nick Advertising - $v1 - in Channel } }

Sorry, Bad English.

alias deurl return $null($regex($1-,/(((http(s)?\72(\57{2}))|(www\56{1}))+(\w*)+(\56{1})+(\w{2,3})\S*)/Sig)) $regml(1)

Comments

Sign in to comment.
Whitey   -  Jul 06, 2005

Works quite well.

Simple script, but I\'m new to regex, so it\'s a nice little learner for me :).

/Whitey

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.