rendered paste bodyon *:text:!clan *:#:{
set %csearch.chan $nick
set %csearch.nick $2
if ($sock(clansearch)) { sockclose search }
sockopen clansearch runehead.com 80
}
on *:sockopen:clansearch:{
sockwrite -nt $sockname GET /clans/search.php?search= $+ %csearch.nick $+ &searchtype=exact HTTP/1.1
sockwrite -nt $sockname Host: runehead.com
sockwrite -nt $sockname $crlf $crlf
}
on *:sockread:clansearch:{
var %cstatus
sockread %cstatus
if ($SockErr) { notice %csearch.chan 6Sorry an 4error6 occured. }
else {
if ( *'ml.php?clan=*'>*</a></td> iswm %cstatus ) { notice %csearch.chan 4[6CLAN4] 6-4 $+ %csearch.nick $+ 6- is in4 $htmlfree(%cstatus) $+ 6. }
}
}
alias -l htmlfree {
; Cleans all html from a file
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}