Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ######################################
- ; #*** Custom Buzzen Channel Lister ***#
- ; #******* DCX Based Dialog By ********#
- ; ######################################
- ;This Dialog Was Made For Use With Buzzen And You Must Have DCX.DLL To Use This.
- ;Thanks To extremity, and Carny all the help
- ;Enjoy :)
- dialog chan {
- title "Buzzen Channel Lister"
- size -1 -1 600 355
- }
- on *:dialog:chan:init:0:{
- dcx Mark $dname cbc
- xdialog -b $dname +ty
- xdialog -c $dname 2 listview 5 30 590 320 report singlesel fullrow nolabelwrap tooltip tabstop grid transparent showsel
- xdid -t $dname 2 +l 0 38 Type $chr(9) +l 0 150 Room $chr(9) +l 0 42 Users $chr(9) +l 0 375 Topic
- xdialog -c $dname 1 comboex 3 3 150 300 dropdown tabstop
- xdid -a $dname 1 0 0 0 0 0 [GN] General
- xdid -a $dname 1 0 0 0 0 0 [CP] Computing
- xdid -a $dname 1 0 0 0 0 0 [RM] Romance
- xdid -a $dname 1 0 0 0 0 0 [LS] Lifestyles
- xdid -a $dname 1 0 0 0 0 0 [PR] Peers
- xdid -a $dname 1 0 0 0 0 0 [CC] City Chats
- xdid -a $dname 1 0 0 0 0 0 [IN] Interests
- xdid -a $dname 1 0 0 0 0 0 [ET] Entertainment
- xdid -a $dname 1 0 0 0 0 0 [NE] News & Politics
- xdid -a $dname 1 0 0 0 0 0 [RL] Religion
- xdid -a $dname 1 0 0 0 0 0 [RP] Roleplay
- xdid -a $dname 1 0 0 0 0 0 [SP] Sport & Health
- xdid -a $dname 1 0 0 0 0 0 [TN] Teens
- xdid -a $dname 1 0 0 0 0 0 [UN] Unlisted
- $chan.list
- }
- alias cbc {
- if (mouse isin $2) { halt }
- if ($3 = 1) {
- var %SelID = $xdid($1, 1).sel
- if (%SelID == 1) chans.get GN
- elseif (%SelID == 2) chans.get CP
- elseif (%SelID == 3) chans.get RM
- elseif (%SelID == 4) chans.get LS
- elseif (%SelID == 5) chans.get PR
- elseif (%SelID == 6) chans.get CC
- elseif (%SelID == 7) chans.get IN
- elseif (%SelID == 8) chans.get ET
- elseif (%SelID == 9) chans.get NE
- elseif (%SelID == 10) chans.get RL
- elseif (%SelID == 11) chans.get RP
- elseif (%SelID == 12) chans.get SP
- elseif (%SelID == 13) chans.get TN
- elseif (%SelID == 14) chans.get UN
- }
- elseif ($2 == sclick) {
- var %room $xdid(chan, 2, 2).seltext
- join $+($chr(37),$chr(35),$replace(%room,$chr(32),\b))
- }
- elseif ($2 == dclick) {
- var %room $xdid(chan, 2, 2).seltext
- join $+($chr(37),$chr(35),$replace(%room,$chr(32),\b))
- }
- }
- ; ########################
- ; #*****Channel Data*****#
- ; ########################
- ;Thanks to extremity for the coding.
- ;#chans.get [ CAT ] - gets categoried chans, default is GN
- alias chans.get {
- sockclose chans
- if ($hget(chans)) { hfree chans } | hmake chans
- hadd chans cat $iif(!$1,gn,$1)
- hadd chans page 1
- sockopen chans buzzen.net 80
- xdid -r chan 2
- }
- on *:sockopen:chans:{
- if ($sockerr) { sockclose $sockname | halt }
- sockwrite -n $sockname GET /roomslist.aspx?pg=1&cat= $+ $hget(chans,cat) HTTP/1.1
- sockwrite -n $sockname HOST: www.buzzen.net
- sockwrite -n $sockname $str($crlf,2)
- }
- on *:sockread:chans: {
- if ($sockerr > 0) return
- var %r | sockread %r
- if ($pos(%r,"rmlist")) {
- if ($pos(%r,rmicon_srv.jpg)) { var %rt BCR }
- elseif ($pos(%r,rmicon_user.jpg)) { var %rt BSR }
- else { var %rt UCR }
- var %r $striphtml(%r)
- if ($numtok(%r,4) > 1) {
- if ($v1 == 4) var %r $instok(%r,14<no topic>,3,4)
- if ($v1 > 5) { var %x $calc($v1 - 2) | var %r $puttok(%r,$replace($gettok(%r,$+(3-,%x), 4),,-),3,4) | var %r $deltok(%r,$+(4-,%x),4) }
- var %i $hget(chans, idx) | inc %i | hadd chans idx %i
- hadd chans $+(type,%i) %rt
- hadd chans $+(name,%i) $gettok(%r,2,4) | hadd chans $+(topic,%i) $gettok(%r,3,4)
- hadd chans $+(users,%i) $gettok(%r,4,4) | hadd chans $+(lang,%i) $gettok(%r,5,4)
- } }
- elseif (Pages: isin %r) { var %nop $gettok($striphtml(%r),-1,4) | hadd chans nop $iif($len(%nop) = 1,%nop,1) }
- elseif (%r == </HTML>) {
- var %page $hget(chans,page)
- if ($hget(chans,nop) > 1 && %page <= $hget(chans,nop)) {
- inc %page | hadd chans page %page
- sockwrite -n $sockname GET /roomslist.aspx?pg= $+ $hget(chans,page) $+ &cat= $+ $hget(chans,cat) HTTP/1.1 $+ $crlf $+ HOST: www.buzzen.net $+ $str($crlf,2)
- }
- else { chans.list }
- }
- }
- alias chans.list {
- var %i $hget(chans, idx), %j 1
- while (%j <= %i) {
- xdid -a chan 2 0 0 + 0 0 0 0 0 0 $+($hget(chans, $+(type,%j))) $chr(9) + 0 -1 0 0 $hget(chans, $+(name,%j)) $chr(9) + 0 -1 0 0 $hget(chans, $+(users,%j)) $chr(9) + 0 -1 0 0 $hget(chans, $+(topic,%j))
- inc %j
- } }
- alias -l striphtml { .noop $regsub($1-,/(<(?:.+?)>)/g,$chr(4),%string) | return %string }
- on *:CLOSE:chan: { if ($hget(chans)) { hfree chans } | sockclose chans }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement