All pastes #526473 Raw Edit

eh

public text v1 · immutable
#526473 ·published 2007-05-31 20:35 UTC
rendered paste body
on *:text:!clan*:#:{
  if (!$2) { notice $nick Please include a person to look up. }
  /set %csearch.chan $chan
  /set %csearch.nick $2
  /set %nick $nick
  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 %nick Sorry an error occured. }
  else {
    if ( *'ml.php?clan=*'>*</a></td> iswm %cstatus ) { notice %nick 2 %csearch.nick 14is in2 $htmlfree(%cstatus) }
  }
}
alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}