Jethro commented on a Page, Random Links Snippet  -  Oct 01, 2011

I see that you have used regex in your code, why not take advantage of it more?

This:> if ($1 == !rlink) || ($1 == .rlink) || ($1 == @rlink) { $iif($left($1,1) == @,/msg #,/notice $nick) Here is your random link: $linkss | .ignore -u2 $nick }
if ($1 == !lastlink) || ($1 == .lastlink) || ($1 == @lastlink) { $iif($left($1,1) == @,/msg #,/notice $nick) This is last link that has been saved: %lastlink | .ignore -u2 $nick }can be done as:

if ($regex($1,/^([!@.])(r|last)link$/iS)) { 
$iif($regml(1) == @,msg #,notice $nick) $iif($regml(2) == r,$&
Here is your random link: $linkss,$&
This is last link that has been saved: %lastlink)
.ignore -u2 $nick
}
 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.