Advertisement
makimaki

Untitled

Jun 19th, 2010
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 KB | None | 0 0
  1. ; ######################################
  2. ; #*** Custom Buzzen Channel Lister ***#
  3. ; #******* DCX Based Dialog By ********#
  4. ; ######################################
  5. ;This Dialog Was Made For Use With Buzzen And You Must Have DCX.DLL To Use This.
  6. ;Thanks To extremity, and Carny all the help
  7. ;Enjoy :)
  8.  
  9. dialog chan {
  10. title "Buzzen Channel Lister"
  11. size -1 -1 600 355
  12. }
  13. on *:dialog:chan:init:0:{
  14. dcx Mark $dname cbc
  15. xdialog -b $dname +ty
  16. xdialog -c $dname 2 listview 5 30 590 320 report singlesel fullrow nolabelwrap tooltip tabstop grid transparent showsel
  17. 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
  18. xdialog -c $dname 1 comboex 3 3 150 300 dropdown tabstop
  19. xdid -a $dname 1 0 0 0 0 0 [GN] General
  20. xdid -a $dname 1 0 0 0 0 0 [CP] Computing
  21. xdid -a $dname 1 0 0 0 0 0 [RM] Romance
  22. xdid -a $dname 1 0 0 0 0 0 [LS] Lifestyles
  23. xdid -a $dname 1 0 0 0 0 0 [PR] Peers
  24. xdid -a $dname 1 0 0 0 0 0 [CC] City Chats
  25. xdid -a $dname 1 0 0 0 0 0 [IN] Interests
  26. xdid -a $dname 1 0 0 0 0 0 [ET] Entertainment
  27. xdid -a $dname 1 0 0 0 0 0 [NE] News & Politics
  28. xdid -a $dname 1 0 0 0 0 0 [RL] Religion
  29. xdid -a $dname 1 0 0 0 0 0 [RP] Roleplay
  30. xdid -a $dname 1 0 0 0 0 0 [SP] Sport & Health
  31. xdid -a $dname 1 0 0 0 0 0 [TN] Teens
  32. xdid -a $dname 1 0 0 0 0 0 [UN] Unlisted
  33. $chan.list
  34. }
  35. alias cbc {
  36. if (mouse isin $2) { halt }
  37. if ($3 = 1) {
  38. var %SelID = $xdid($1, 1).sel
  39. if (%SelID == 1) chans.get GN
  40. elseif (%SelID == 2) chans.get CP
  41. elseif (%SelID == 3) chans.get RM
  42. elseif (%SelID == 4) chans.get LS
  43. elseif (%SelID == 5) chans.get PR
  44. elseif (%SelID == 6) chans.get CC
  45. elseif (%SelID == 7) chans.get IN
  46. elseif (%SelID == 8) chans.get ET
  47. elseif (%SelID == 9) chans.get NE
  48. elseif (%SelID == 10) chans.get RL
  49. elseif (%SelID == 11) chans.get RP
  50. elseif (%SelID == 12) chans.get SP
  51. elseif (%SelID == 13) chans.get TN
  52. elseif (%SelID == 14) chans.get UN
  53. }
  54. elseif ($2 == sclick) {
  55. var %room $xdid(chan, 2, 2).seltext
  56.  
  57. join $+($chr(37),$chr(35),$replace(%room,$chr(32),\b))
  58. }
  59. elseif ($2 == dclick) {
  60. var %room $xdid(chan, 2, 2).seltext
  61.  
  62. join $+($chr(37),$chr(35),$replace(%room,$chr(32),\b))
  63. }
  64.  
  65. }
  66.  
  67. ; ########################
  68. ; #*****Channel Data*****#
  69. ; ########################
  70. ;Thanks to extremity for the coding.
  71.  
  72. ;#chans.get [ CAT ] - gets categoried chans, default is GN
  73. alias chans.get {
  74. sockclose chans
  75. if ($hget(chans)) { hfree chans } | hmake chans
  76. hadd chans cat $iif(!$1,gn,$1)
  77. hadd chans page 1
  78. sockopen chans buzzen.net 80
  79. xdid -r chan 2
  80. }
  81. on *:sockopen:chans:{
  82. if ($sockerr) { sockclose $sockname | halt }
  83. sockwrite -n $sockname GET /roomslist.aspx?pg=1&cat= $+ $hget(chans,cat) HTTP/1.1
  84. sockwrite -n $sockname HOST: www.buzzen.net
  85. sockwrite -n $sockname $str($crlf,2)
  86. }
  87. on *:sockread:chans: {
  88. if ($sockerr > 0) return
  89. var %r | sockread %r
  90. if ($pos(%r,"rmlist")) {
  91.  
  92. if ($pos(%r,rmicon_srv.jpg)) { var %rt BCR }
  93. elseif ($pos(%r,rmicon_user.jpg)) { var %rt BSR }
  94. else { var %rt UCR }
  95.  
  96. var %r $striphtml(%r)
  97. if ($numtok(%r,4) > 1) {
  98. if ($v1 == 4) var %r $instok(%r,14<no topic>,3,4)
  99. 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) }
  100. var %i $hget(chans, idx) | inc %i | hadd chans idx %i
  101. hadd chans $+(type,%i) %rt
  102. hadd chans $+(name,%i) $gettok(%r,2,4) | hadd chans $+(topic,%i) $gettok(%r,3,4)
  103. hadd chans $+(users,%i) $gettok(%r,4,4) | hadd chans $+(lang,%i) $gettok(%r,5,4)
  104. } }
  105. elseif (Pages: isin %r) { var %nop $gettok($striphtml(%r),-1,4) | hadd chans nop $iif($len(%nop) = 1,%nop,1) }
  106. elseif (%r == </HTML>) {
  107. var %page $hget(chans,page)
  108. if ($hget(chans,nop) > 1 && %page <= $hget(chans,nop)) {
  109. inc %page | hadd chans page %page
  110. 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)
  111. }
  112. else { chans.list }
  113. }
  114. }
  115. alias chans.list {
  116. var %i $hget(chans, idx), %j 1
  117. while (%j <= %i) {
  118. 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))
  119. inc %j
  120. } }
  121. alias -l striphtml { .noop $regsub($1-,/(<(?:.+?)>)/g,$chr(4),%string) | return %string }
  122. on *:CLOSE:chan: { if ($hget(chans)) { hfree chans } | sockclose chans }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement