alias wotrodb { if $1 { set %wotro.search $1- sockopen wotrodb wotro.kicks-ass.org 80 echo -cs info - echo -cs info WoTRO Database - Searching Mobs for: $1- } } alias -l wotro.die { sockclose wotrodb | unset %wotro.* | echo -cs info End of Results | echo -cs info - } alias -l wotro.address { return $+(http://fidsah.kicks-ass.org/php/mob.php?search=,$replace($1-,$chr(32),+),&mIRC=1) } on *:sockopen:wotrodb:{ sockwrite -n $sockname GET $wotro.address(%wotro.search) HTTP/1.1 sockwrite -n $sockname Host: fidsah.kicks-ass.org $+ $crlf $+ $crlf } on *:sockread:wotrodb:{ ;this will trigger when the website cant be reached if $sockerr { echo -s Socket Error: $sockerr | halt } else { .var %wotro.raw ; sockread the result, line by line into %wotro.raw sockread %wotro.raw ; uncomment the following line to see the entire receieved data, for debugging. if %wotro.raw != $null { tokenize 32 %wotro.raw if $1 = Name: { echo -cs info2 $1- } } /* This is where you add your code */ } if isin %wotro.raw { wotro.die halt } echo -cs info2 - }