Advertisement
makimaki

blahhhhhhhh

May 30th, 2010
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.35 KB | None | 0 0
  1. ; ########################
  2. ; #*******Dialogs********#
  3. ; ########################
  4.  
  5. alias favorite {
  6.   var %nw $hget(nth, $network) | var %i $hget(nth, $+(Favs,%nw))
  7.   if ($1) { var %i $addtok(%i, $1, 4) | hadd nth Favs %i | halt }
  8.   dialog -mdrvo fav fav
  9.   var %x $numtok(%i, 4), %y 1
  10.   while (%y <= %x) { did -a fav 1 $gettok(%i,%y,4) | inc %y }  
  11. }
  12. dialog fav {
  13.   title "Favorite Channels"
  14.   size -1 -1 346 283
  15.   option pixels
  16.   list 1, 22 28 300 195, size
  17.   button "Add", 3, 24 234 88 24, flat
  18.   button "Remove", 2, 126 234 88 24,  flat
  19.   button "Join", 4, 228 234 88 24, flat default
  20.   box "Favorite Channel List", 5, 10 8 324 262
  21. }
  22. on *:dialog:fav:sclick:*: {
  23.   var %i $did
  24.   if (!$did(fav,1,1).sel) { halt }
  25.   if (%i == 4) { join $did(fav,1).seltext }
  26.   elseif (%i == 2) {
  27.     var %nw $hget(nth, $network)
  28.     hadd nth Favs $remtok( $hget(nth, $+(Favs,%nw)), $did(fav,1).seltext, 1, 4)
  29.     var %i $hget(nth, $+(Favs,%nw)), %x $numtok(%i, 4), %y 1, %s $did(fav,1,1).sel
  30.     did -r fav 1
  31.     while (%y <= %x) { did -a recent 1 $gettok(%i,%y,4) | inc %y }  
  32.     did -cf fav 1 %s
  33.   }
  34.   elseif (%i == 3) { if (!$hget(nth, $network)) { hadd nth $network $network } | var %nw $hget(nth, $network) |   if (!$hget(nth, $+(favs,%nw))) { hadd nth $+(favs,%nw) favorite $active }  }
  35. }
  36. on *:dialog:fav:dclick:*: { if ($did == 1) { join $did(fav,1).seltext } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement