tglogo.png

Downloading File

Filename: Sparkpea Channels
menu channel,status {
  RoomList://dialog -m chanList chanList
}

dialog chanList {
  title "Channels"
  size -1 -1 128 136
  option dbu
  button "Join", 2, 91 1 36 15, flat
  button "Channels", 3, 91 17 36 15, flat
  list 1, 0 1 91 116, size
  button "OK", 5, 91 116 36 16, flat ok
  box "", 6, 1 121 88 12, result
  button "Categories", 4, 91 33 36 15, flat
}

on *:DIALOG:chanList:sclick:3: {
  set %category $right($gettok($did(chanList,1).seltext,1-2,32),2)
  did -r chanList 1
  ChannelList
}  

on *:DIALOG:chanList:sclick:4: {
  did -r chanList 1
  roomcats
}

alias roomlist { //dialog -m chanList chanList }

on *:dialog:chanList:init:*: {
  roomcats
}

alias -l ChannelList {
  set %room.ticks $ticks
  if ($sock(rooms)) sockclose rooms
  sockopen rooms sparkpea.net 80
}
on *:sockopen:rooms: { 
  if ($sockerr) { did -a chanList 1 Sock error: $+($chr(40),$sock($sockname).wserr,$chr(41)) -> $sock($sockname).wsmsg | return }
  sockwrite -n $sockname GET $+(/category.php?cat=, $+ %category $+ ,&age=18) HTTP/1.0 $+ $crlf
  sockwrite -n $sockname Host: sparkpea.net $+ $crlf $+ $crlf
  %total.rooms = 1
}

on *:sockread:rooms: {
  if ($sockerr) { did -a chanList 1 Sock error: $+($chr(40),$sock($sockname).wserr,$chr(41)) -> $sock($sockname).wsmsg | return }
  var %b | sockread %b | tokenize 32 %b
  if ($regex($1-,\<td align=left valign=middle class=\"table\"\>\<div class=\"table\"\>\<a href=\"chatroom.php\?rhx=[A-Z0-9]+\"\>(.+)\<\/a\>\<\/div\>\<\/td\>)) {
    if ($regml(1)) {
      did -a chanList 1 $(%#,0) $+ $regml(1)
      inc %total.rooms 
    }
  }
  if ($1- == <!-- website Footer -->) {
    did -a chanList 1 $chr(160)
    did -a chanList 6 * Total Rooms: $calc(%total.rooms - 1)
  }
}

on *:DIALOG:chanList:sclick:2: {
  join $gettok($did(chanList,1).seltext,1-2,32)
}

alias roomcats {
  did -a chanList 1 General; GN
  did -a chanList 1 City Chats; GE
  did -a chanList 1 Games; EA
  did -a chanList 1 Computing; CP
  did -a chanList 1 Interest; II
  did -a chanList 1 Life Styles; LF
  did -a chanList 1 News; NW
  did -a chanList 1 Peers; PR
  did -a chanList 1 Religion; RL
  did -a chanList 1 Role Play; RP
  did -a chanList 1 Romance; RM
  did -a chanList 1 Sports; SP
  did -a chanList 1 Teens; TN
  did -a chanList 1 $chr(160)
  did -a chanList 1 Click on a category and hit
  did -a chanList 1 "Channels" for a list of rooms
}

Related Files

by TacticalThunder
by HizPower

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand