nox` commented on a Page, Another IP tracker  -  Jan 13, 2014

on *:SOCKREAD:ip-tracker: {
if ($sockerr > 0) return
sockread %ip-tracker
if ($regex(%ip-tracker,/

(\S+): ([^<]+)<\/div>/)) echo -atg 8=- $regml(1) $+ :11 $regml(2)
elseif $regex(%ip-tracker,/href="([^"]+)"/) { echo -at 8=- Link: $remove($regml(1),amp;) | run $remove($regml(1),amp;) }
sockclose ip-tracker
Lucyfero  -  Jan 14, 2014

Sorry nox` , I don't understand your comment.
As far as I see, you propose a shortened version of the code. If so I have 2 motivations for doing it in that way:
1 - I use variables because I need them in another script running in parallel
2 - I like a cleaner coding that, for me, is easier to mantain
Last but not least, I'm a novice in scripting and I know well my limitations.

Anyway thank a lot for your interest

nox`  -  Jan 14, 2014

Hello, yes my code is an example not to make 5 times the same regex
I understand the second reason but I do not agree with your first right.
" I need them in another script "
You post for other users not for you it is advisable to clean up after your script and not to variables that can not be used.
This is just my opinion good continuation

Lucyfero  -  Jan 14, 2014

I respect your opinion.
For those users that do not need to save the values in variables, just change "set" with "var" .
Thanks nox', regards.

Sign in to comment

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.