Downloading File
Filename: Channel List Dialog for SPCN
dialog chan { title "Channels" size -1 -1 680 400 option pixels box "Channels", 1, 8 8 668 348 list 2, 16 24 500 324, size button "LIST", 3, 528 24 75 25 button "Close", 4, 528 320 75 25, ok cancel radio "City Chats", 5, 536 72 84 20 radio "Computing", 6, 536 88 92 20 radio "Fun 'n' Games", 7, 536 104 124 20 radio "General", 8, 536 120 92 20 radio "Interests", 9, 536 136 100 20 radio "Lifestyles", 10, 536 152 100 20 radio "News", 11, 536 168 100 20 radio "Peers", 12, 536 184 100 20 radio "Religion", 13, 536 200 100 20 radio "Roleplay", 14, 536 216 100 20 radio "Romance", 15, 536 232 100 20 radio "Sports", 16, 536 248 100 20 radio "Music", 17, 536 264 100 20 box "Options", 18, 528 56 140 260 check "Show empty channels", 19, 536 288 124 20 box "Status", 20, 8 352 668 44 edit "", 21, 16 368 652 21, disable } on 1:dialog:chan:init:0:did -c chan %cat | $iif(%cat2,did -c chan 19) on 1:dialog:chan:close:0:sockclose list on 1:dialog:chan:sclick:5-17:set %cat $did on 1:dialog:chan:sclick:19:$iif($did($did).state,inc %cat2,unset %cat2) on 1:dialog:chan:dclick:2:join $gettok($did($did).seltext,1,32) on 1:dialog:chan:sclick:3:sockclose list | did -r chan 2 | did -o chan 21 1 Looking up channel list... | listc menu status,channel { Channel Dialog:dialog -m chan chan } alias sw return sockwrite -n alias cf return $chr(37) $+ $chr(35) $+ $remove($replace($1-,$chr(32),\b,$chr(44),\c),$chr(37),$chr(35)) alias cnum { return $replace($1,5,GE,6,CP,7,EA,8,GN,9,II,10,LF,11,NW,12,PR,13,RL,14,RP,15,RM,16,SP,17,TN) } alias listc { sockopen list sparkpea.net 80 } on *:sockopen:list:var %s = $sockname | $sw %s GET /category.php?cat= $+ $iif(%cat,$cnum(%cat),8) HTTP/1.1 | $sw %s Host: sparkpea.net | $sw %s $crlf | set %cat1 0 on *:sockread:list:{ var %1 | sockread %1 | tokenize 32 %1 if (t val isin $1-) && ($numtok($1-,32) = 4) set %lnum $iif($gettok($gettok($4,2,62),1,60),$ifmatch,0) if (php?rhx= isin $1-) && (ng" al !isin $1-) { var %c = $gettok($gettok($remove($gettok($1-,2,63),<b>),2,62),1,60) if (%c) { if (!%cat2) && (%lnum = 0) halt did -a chan 2 $cf(%c) ( $+ %lnum $+ ) | inc %cat1 | did -o chan 21 1 Receiving channel list... } } if (</tbo isin $1-) { did -o chan 21 1 Lookup complete, %cat1 channels found. | sockclose $sockname } }
Related Files
by x-cOn
by Zantetsuken and ZeroGravity
by HizPower