how can i modify this code to return a certain amount of results. lets say i want it to return 5 or 10 instead of only 1 result that it gives when the trigger is used
on *:TEXT:!url *:#:bb_url_trigger $1-
on *:INPUT:*: { if ( $1 == !url ) { bb_url_trigger $1- | halt } }
alias bb_url_trigger {
var %input $replace($2-,$chr(36), $+ $chr(36) $+ ,$chr(37), $+ $chr(37) $+ ,$chr(62),.,$chr(124),.)
if ( !%input ) || ( $2 == help ) {
$iif($nick == $me,echo -ta,.notice $nick) URL-SEARCH
$iif($nick == $me,echo -ta,.notice $nick) Usage: !url searchstring (wildcards possible)
$iif($nick == $me,echo -ta,.notice $nick) Example: "!url german.imdb" or "!url BrotBueXe" or "!url that*the"
$iif($nick == $me,echo -ta,.notice $nick) Hint: You can only get urls that are catched anytime in this chan. You can search for nicks or msgs also.
halt
}
var %line = $read(" $+ $scriptdir $+ bb-urlcatcher.hist $+ ",w,$+(*,$chr(9),$iif($nick == $me,*,$chan),$chr(9),*,%input,*))
if ( %line == $null ) $iif($nick == $me,echo -ta ,.notice $nick) nothing found
else {
;$iif($nick == $me,echo -ta,msg $iif($chan != null,$ifmatch,%nick)) [URLHIST] $gettok(%line,1,9) / $gettok(%line,3,9) $+ : $gettok(%line,4,9)
$iif($nick == $me,echo -ta,.notice $nick) Entrys: $lines(" $+ $scriptdir $+ bb-urlcatcher.hist $+ ") - New: %bb-url-catcher-new - Overall: %bb-url-catcher-count
$iif($nick == $me,echo -ta,.notice $nick) $gettok(%line,5,9) posted on $chr60 $gettok(%line,1,9) $+ $chr60 by $chr60 $+ $chr60 $gettok(%line,3,9)
}
the 1 return with the search doesnt help much, so 5 or 10 would be a bit more helpful to help people find the url they want