Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias channel.list {
- var %c $$1 , %p $2 | unset %channel.list*
- set %channel.list.total 0 | set %channel.list.ticks $ticks | set %channel.list.users 0
- if ($sock(channel.list)) sockclose $ifmatch
- if (!$window(@channel.list)) window -dlkf -t25,29 @channel.list verdana 10
- channel.list.buf 1 | titlebar @channel.list - $channel.list.flip(%c) $iif(%p,- Page: %p)
- sockopen channel.list www.buzzen.net 80
- sockmark channel.list %c %p
- }
- alias channel.list.flip return $gettok($channel.list.cat(2),$findtok($channel.list.cat(1),$$1,44),44)
- alias channel.list.cat {
- if ($$1 == 1) return UN,GN,RM,CP,PR,IN,NE,SP,CC,LS,ET,RL,RP
- elseif ($$1 == 2) return Unlisted,General,Romance,Computing,Peers,Interests,News & Events,Sports & Politics,City Chats,Lifestyles,Entertainment,Religion,RolePlay
- }
- alias channel.list.menu1 {
- if ($1 isin begin end) return
- if ($gettok($channel.list.cat(2),$1,44)) { var %i $ifmatch | return $+($iif($regex($window(@channel.list).title,%i),$style(3)) %i,:,channel.list $gettok($channel.list.cat(1),$1,44)) }
- }
- alias channel.list.menu2 {
- if ($1 <= $gettok(%channel.list.num,1,32)) return $1 :channel.list $gettok(%channel.list.num,2,32) $1
- }
- alias channel.list.buf {
- if ($1 == 1) {
- clear @channel.list
- aline @channel.list $chr(160)
- aline @channel.list Room $chr(9) Users $chr(9) Topic
- aline @channel.list $chr(160)
- }
- if ($1 == 2) {
- aline @channel.list $chr(160)
- aline @channel.list - Synched in: $+(,$calc(($ticks - %channel.list.ticks) / 1000),s) $chr(160) Channels: $+(,%channel.list.total,) $chr(160) Users: $+(,%channel.list.users,)
- }
- }
- on 1:sockopen:channel.list:{
- tokenize 32 $sock($sockname).mark
- var %str $+(/roomslist.aspx?,$iif($2,$+(pg=,$2,&)),cat=,$1)
- sockwrite -n $sockname POST %str HTTP/1.4
- sockwrite -n $sockname Host: www.buzzen.net
- sockwrite -n $sockname Content-Length: $len(%str) $+ $str($crlf,2) $+ %str
- sockwrite -n $Sockname $crlf
- }
- on 1:sockread:channel.list:{
- var %r | sockread %r
- if ($regex(%r,Title2".Pages:)) && ($regsubex(%r,/^[^<]*>|<[^>]*>|<[^>]*$/g,)) && ($numtok($gettok($v1,2-,32),32) > 1) {
- tokenize 32 $sock($sockname).mark
- set %channel.list.num $v1 $1
- }
- if ($regex(%r,chatui.+rmlist)) {
- tokenize 1 $regsubex(%r,/^[^<]*>|<[^>]*>|<[^>]*$/g,$chr(1)) | inc %channel.list.total
- var %u $iif(!$regex(%r,</a></td><td></td>),$4,$3)
- %channel.list.users = %channel.list.users + %u
- aline @channel.list $+($chr(37),$chr(35),$replace($2,$chr(32),\b)) $chr(9) $chr(160) %u $chr(9) $iif(!$regex(%r,</a></td><td></td>),$3)
- }
- if ($regex(%r,</HTML>)) { sockclose $sockname | channel.list.buf 2 }
- }
- on *:close:@channel.list:unset %channel.list*
- menu menubar {
- Room List:/channel.list GN
- }
- menu @channel.list {
- dclick:join $gettok($sline(@channel.list,1),1,9)
- Join Channel:join $$gettok($sline(@channel.list,1),1,9)
- -
- Category Select
- .$submenu($channel.list.menu1($1))
- $iif(%channel.list.num,Select Page)
- .$submenu($channel.list.menu2($1))
- -
- Channel Link
- .Echo Link In Status:echo -st * Link: http://www.buzzen.net/chatui.aspx?rm=%25%23 $+ $replace($right($gettok($sline(@channel.list,1),1,9),-2),\b,+)
- .Copy Link:clipboard http://www.buzzen.net/chatui.aspx?rm=%25%23 $+ $replace($right($gettok($sline(@channel.list,1),1,9),-2),\b,+)
- .Run in Webchat:run iexplore http://www.buzzen.net/chatui.aspx?rm=%25%23 $+ $replace($right($gettok($sline(@channel.list,1),1,9),-2),\b,+)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement