Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; %urlpattern = ^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$
- while (%wordCount > 0) {
- var %currentWord = $gettok(%template [ $+ [ $nick ] ],%wordCount,32)
- echo $chan currentWord: %currentWord
- ;echo $chan template: %template [ $+ [ $nick ] ]
- echo $chan checking word for urls...
- ; ---- Below line always returns 0 on url token, but when doing //echo $chan $regex(url, http://something.com , %urlpattern) it returns 1
- echo $chan results: $regex(url, %currentWord , %urlpattern)
- if ($regex(url,%currentWord,%urlpattern) >= 1) {
- echo $chan WENT!
- var %template [ $+ [ $nick ] ] $reptok(%template [ $+ [ $nick ] ], %currentWord, %urlColor $+ %currentWord $+ , 0,32)
- }
- dec %wordCount 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement