on *:TEXT:?clan*:#:{ if (!$2) { notice $nick *** [ $+ $col1(Clan) $+ $col2(]: You must supply a name) halt } elseif ($2 == zezima || $2 == n0valyfe) { notice $nick *** [$+ $col1(Clan) $+ $col2(]: You are not aloud to do that) } else { inc %x 1 set %clan.name. [ $+ [ %x ] ] $replace($2- ,$chr(32),+) set %clan.style. [ $+ [ %x ] ] $iif($left($1,1) == @,msg $chan,.notice $nick) sockopen clan. $+ %x runehead.com 80 } } on *:SOCKOPEN:clan.*:{ sockwrite -n $sockname GET /clans/search.php?search= $+ %clan.name. [ $+ [ %x ] ] $+ &searchtype=exact sockwrite -n $sockname Host: $+(www.runehead.com,$crlf,$crlf) } on *:SOCKREAD:clan.*:{ if ($sockerr) { %clan.style. [ $+ [ %x ] ] *** [ $+ $col1(Clan) $+ $col2(]: Error while connecting) sockclose $sockname halt } else { var %tmp sockread %tmp if $regex(results,%tmp,/
No results were found for the exact search (.*)(.*)/) { %clan.style. [ $+ [ %x ] ] 12 [ $+ $col1(Clan) $+ $col2(]: %clan.name. [ $+ [ %x ] ]) $col1(is in clan:) $col2($regml(clan,2)) } if