Advertisement
makimaki

chan list

Jun 5th, 2010
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.46 KB | None | 0 0
  1.  
  2.  
  3. alias channel.list {
  4.   var %c $$1 , %p $2 | unset %channel.list*
  5.   set %channel.list.total 0 | set %channel.list.ticks $ticks | set %channel.list.users 0
  6.  
  7.   if ($sock(channel.list)) sockclose $ifmatch
  8.   if (!$window(@channel.list)) window -dlkf -t25,29 @channel.list verdana 10
  9.   channel.list.buf 1 | titlebar @channel.list - $channel.list.flip(%c) $iif(%p,- Page: %p)
  10.  
  11.   sockopen channel.list www.buzzen.net 80
  12.   sockmark channel.list %c %p
  13. }
  14.  
  15. alias channel.list.flip return $gettok($channel.list.cat(2),$findtok($channel.list.cat(1),$$1,44),44)
  16.  
  17. alias channel.list.cat {
  18.   if ($$1 == 1) return UN,GN,RM,CP,PR,IN,NE,SP,CC,LS,ET,RL,RP
  19.   elseif ($$1 == 2) return Unlisted,General,Romance,Computing,Peers,Interests,News & Events,Sports & Politics,City Chats,Lifestyles,Entertainment,Religion,RolePlay
  20. }
  21.  
  22. alias channel.list.menu1 {
  23.   if ($1 isin begin end) return
  24.   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)) }
  25. }
  26.  
  27. alias channel.list.menu2 {
  28.   if ($1 <= $gettok(%channel.list.num,1,32)) return $1 :channel.list $gettok(%channel.list.num,2,32) $1
  29. }
  30.  
  31. alias channel.list.buf {
  32.   if ($1 == 1) {
  33.     clear @channel.list
  34.     aline @channel.list $chr(160)
  35.     aline @channel.list Room $chr(9) Users $chr(9) Topic
  36.     aline @channel.list $chr(160)
  37.   }
  38.   if ($1 == 2) {
  39.     aline @channel.list $chr(160)
  40.     aline @channel.list - Synched in: $+(,$calc(($ticks - %channel.list.ticks) / 1000),s) $chr(160) Channels: $+(,%channel.list.total,) $chr(160) Users: $+(,%channel.list.users,)
  41.   }
  42. }
  43.  
  44. on 1:sockopen:channel.list:{
  45.   tokenize 32 $sock($sockname).mark
  46.   var %str $+(/roomslist.aspx?,$iif($2,$+(pg=,$2,&)),cat=,$1)
  47.   sockwrite -n $sockname POST %str HTTP/1.4
  48.   sockwrite -n $sockname Host: www.buzzen.net
  49.   sockwrite -n $sockname Content-Length: $len(%str) $+ $str($crlf,2) $+ %str
  50.   sockwrite -n $Sockname $crlf
  51. }
  52.  
  53. on 1:sockread:channel.list:{
  54.   var %r | sockread %r
  55.   if ($regex(%r,Title2".Pages:)) && ($regsubex(%r,/^[^<]*>|<[^>]*>|<[^>]*$/g,)) && ($numtok($gettok($v1,2-,32),32) > 1) {
  56.     tokenize 32 $sock($sockname).mark
  57.     set %channel.list.num $v1 $1
  58.   }
  59.   if ($regex(%r,chatui.+rmlist)) {
  60.     tokenize 1 $regsubex(%r,/^[^<]*>|<[^>]*>|<[^>]*$/g,$chr(1)) | inc %channel.list.total
  61.  
  62.     var %u $iif(!$regex(%r,</a></td><td></td>),$4,$3)
  63.     %channel.list.users = %channel.list.users + %u
  64.  
  65.     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)
  66.   }
  67.   if ($regex(%r,</HTML>)) { sockclose $sockname | channel.list.buf 2 }
  68. }
  69.  
  70. on *:close:@channel.list:unset %channel.list*
  71.  
  72. menu menubar {
  73.   Room List:/channel.list GN
  74. }
  75.  
  76. menu @channel.list {
  77.   dclick:join $gettok($sline(@channel.list,1),1,9)
  78.  
  79.   Join Channel:join $$gettok($sline(@channel.list,1),1,9)
  80.   -
  81.   Category Select
  82.   .$submenu($channel.list.menu1($1))
  83.   $iif(%channel.list.num,Select Page)
  84.   .$submenu($channel.list.menu2($1))
  85.   -
  86.   Channel Link
  87.   .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,+)
  88.   .Copy Link:clipboard http://www.buzzen.net/chatui.aspx?rm=%25%23 $+ $replace($right($gettok($sline(@channel.list,1),1,9),-2),\b,+)
  89.   .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,+)
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement