Downloading File
Filename: SPCN Room Lister V3 (Fixed)
;========================================= ;spcn room lister v3 ;by zantetsuken ;msn.unhex by eXonyte ;example /rooms cp ;to get category abreviations /listcat ;========================================= ;v2 updated 11/28/2007 3:26 pm ;========================================= ;v2 fixed not listing all the rooms ;v2 fixed the pe for peers its now pr ;v2 removed the colorish theme ;v2 removed the @rooms window ;v2 lil slower but list all the rooms atleast ;v2 %#helpdesk is listed in every category ;========================================= ;v3 updated 1/06/2008 6:37 pm ;v3 fixed on 1/26/2008 12:13 pm ;========================================= ;v3 recoded some of it. alot faster now ;v3 added error msg for wrong category givin ;v3 added sock error msg for sockread\sockopen ;v3 readded the @rooms window ;v3 fixed helpdesk not listing in every category ;========================================= alias rooms { if ($!window(@rooms)) window -e @rooms clear @rooms if (!$1) { echo @rooms * error; no category was given; /rooms category | return } if (!$findtok(ge cp gn ea ii lf nw pr rl rp rm sp tn,$1,32)) { echo @rooms * error; No such category. | halt } set %room.cat $1 echo @rooms * Finding rooms for; $rep.cat(%room.cat) (may take a few moments) ... echo @rooms - sget.rooms } alias -l sget.rooms { set %room.ticks $ticks if ($sock(get.rooms)) sockclose get.rooms sockopen get.rooms sparkpea.net 80 } on *:sockopen:get.rooms:{ if ($sockerr) { echo @rooms 4 Sock error: $+($chr(40),$sock($sockname).wserr,$chr(41)) -> $sock($sockname).wsmsg | return } sockwrite -n $sockname GET $+(/category.php?cat=,%room.cat,&age=18) HTTP/1.0 $+ $crlf sockwrite -n $sockname Host: sparkpea.net $+ $crlf $+ $crlf set %room.num 1 } on *:sockread:get.rooms:{ if ($sockerr) { echo @rooms 4 Sock error: $+($chr(40),$sock($sockname).wserr,$chr(41)) -> $sock($sockname).wsmsg | return } var %b | sockread %b | tokenize 32 %b if (*href="chatroom.php?rhx=* iswmcs $2) { echo @rooms $+(%room.num,;) $msn.unhex($gettok($gettok($2,3,61),1,34)) | inc %room.num | halt } elseif (*<a href="chatroom.php?rhx=* iswmcs $9-) { echo @rooms $+(%room.num,;) $msn.unhex($gettok($gettok($10,3,61),1,34)) | inc %room.num | halt } elseif (*<a href="chatroom.php?rhx=* iswmcs $6-) { echo @rooms $+(%room.num,;) $msn.unhex($gettok($gettok($7,3,61),1,34)) | inc %room.num | halt } elseif (*<!-- Website Footer -->* iswm $1-) { echo @rooms - | echo @rooms * Found $calc(%room.num -1) rooms in: $+($chr(40),$calc(($ticks - %room.ticks) / 1000),$chr(32),secs,$chr(41)) | unset %room.* | halt } } alias -l msn.unhex { var %l 1, %r while (%l <= $len($1-)) { if (!$2) { if ($mid($1-,%l,2) != 20) %r = %r $+ $chr($base($mid($1-,%l,2),16,10)) else %r = %r $chr($base($mid($1-,%l,2),16,10)) } else %r = %r $+ $chr($base($mid($1-,%l,2),16,10)) inc %l 2 } return %r } alias -l rep.cat { return $replace($1-,ge,City Chats,cp,Computing,gn,General,ea,Fun 'N' Games,ii,Interest,lf,Life Styles,nw,News,pr,Peers,rl,Religion,rp,Roleplay,rm,Romance,sp,Sports,tn,Teens) } alias listcat { if ($!window(@rooms)) window -e @rooms clear @rooms echo @rooms - echo @rooms General; GN echo @rooms City Chats; GE echo @rooms Fun 'N' Games; EA echo @rooms Computing; CP echo @rooms Interest; II echo @rooms Life Styles; LF echo @rooms News; NW echo @rooms Peers; PR echo @rooms Religion; RL echo @rooms Role Play; RP echo @rooms Romance; RM echo @rooms Sports; SP echo @rooms Teens; TN echo @rooms - }
Related Files
by HizPower
by x-cOn
by Raditz aka RacerX