; http://www.mircscripts.org Search Snippet v3.0 ; By Soul_Eater (c) 2004-05 ; based off of and thanks to: mircscripts.org update checker by Honey18 ; $striphtml by fubar ; This snippet searches ms.org and returns your query in an @window, in a detailed format ; right click queries for more details, to go to the URL, or to download the file ; Access the site in mIRC update coming soon. ; Syntax: /mssearch type sort query ; type: all, dll, script, addon, code, theme, tutorial, misc ; sort: asc, desc ; (asc = ascending, desc = descending) ; query: what you're searching for ; ;I definitely could see this be implemented in a scripting channel help bot or something similar,possibly messaging results to ;users? ; alias -l striphtml { if ($1) { var %strip,%parm = <> $remove($1-,> <,><,$chr(9)) <>,%n = 2 while ($gettok($gettok(%parm,%n,62),1,60)) { %strip = %strip $ifmatch inc %n } return %strip } } alias mssearch { unset %sockread* %ms-* %xline %descr write -c descr.ini if ($sock(ms.org)) { echo $color(info) -at *** Already connected to mircscripts.org and searching | return } window -abwl -t5,15,40,50,60,80,110 @ms.org 50 50 650 400 -4 clear @ms.org sockopen ms.org mircscripts.org 80 if ($1 == $false) || ($1 == $+($chr(36),nottrue)) || ($1 == $+($chr(36),untrue)) { window -h @ms.org set %ms-type $2 set %ms-sort $3 set %ms-query $replace($4-,$chr(32),$chr(43)) set %ms-getsite $1 } else { set %ms-type $1 set %ms-sort $2 set %ms-query $replace($3-,$chr(32),$chr(43)) } set %ms-ticks $ticks titlebar @ms.org Connecting... aline $color(info) @ms.org Connecting to mircscripts.org aline $color(info) @ms.org - } ON *:SOCKOPEN:ms.org:{ if ($sockerr) { aline $color(info) @ms.org $sock($sockname).wsmsg return } sockwrite -n $sockname GET $+(/archive.php?stype=,%ms-type,&squery=,%ms-query,&sorder=file_date&ssort=,%ms-sort,&perpage=all) HTTP/1.1 sockwrite -n $sockname Host: mircscripts.org $+ $str($crlf,2) titlebar @ms.org -> Searching for $replace(%ms-query,$chr(43),$chr(32)) aline $color(info) @ms.org Listing $+(,%ms-type,) results for $+(",$replace(%ms-query,$chr(43),$chr(32)),") aline $color(info) @ms.org - aline @ms.org $+(Type,$chr(9),$str($chr(160),3),Date,$chr(9),$str($chr(160),4),Title,$chr(9),$str($chr(160),3),Size,$chr(9),$str($chr(160),4),Author,$chr(9),$str($chr(160),3),Downloads) set %descr $calc($line(@ms.org,0) + 1) set %ms-tot 0 set %msinf 1 } ON *:SOCKREAD:ms.org:{ if ($sockerr) { sockclose ms.org return } if (!$window(@ms.org)) { sockclose $sockname } sockread %sockread if (* iswm %sockread) || (* iswm %sockread) { aline $color(info) @ms.org $remove($remove($Gettok(%sockread,2,62),) $+ $chr(9) inc %ms-tot } if (* iswm %sockread) || (* iswm %sockread) { set %xline $remove($line(@ms.org,$line(@ms.org,0)),comments,/>,) } } if (*fdN[* iswm %sockread) { if (*htmlStr* iswm %sockread) { return } writeini descr.ini Title %descr $remove($gettok(%sockread,2,39),\,,/>,)) inc %descr } if (%ms-getsite == $false) && (*/comments.php?id=* iswm %sockread) { run $+(http://www.mircscripts.org/,$remove($gettok(%sockread,2,47),">comments<)) } if (%ms-getsite == $+($chr(36),nottrue)) && (*/download.php?id=* iswm %sockread) { run $+(http://www.mircscripts.org,$remove($remove($gettok(%sockread,13,62),** iswm %sockread) { if ($right($gettok(%xline,4,9),1) == k) { return } var %x Search Completed in %t $+ secs... aline $color(info) @ms.org - aline $color(info) @ms.org Search Completed in %t $+ secs... aline $color(info) @ms.org $+(,%ms-tot,) results found. if (%ms-getsite) { window -c @ms.org } } } ON *:CLOSE:@ms.org:{ sockclose ms.org .remove descr.ini unset %sockread* %ms-* %xline %descr write -c descr.ini } menu @ms.org { Info:var %x $input($readini(descr.ini,Descr,$sline(@ms.org,1).ln),o,Description for $readini(descr.ini,Title,$sline(@ms.org,1).ln) ) Goto URL Now:mssearch $false all asc $readini(descr.ini,Title,$sline(@ms.org,1).ln) Download Now:mssearch $+($chr(36),nottrue) all asc $readini(descr.ini,Title,$sline(@ms.org,1).ln) }