Advertisement
makimaki

nicklist

Feb 6th, 2011
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 7.09 KB | None | 0 0
  1. alias nicklist {
  2.   if ($dialog(nlist)) { dialog -x nlist }
  3.   dialog -m nlist nlist
  4.   xdock -m $dialog(nlist).hwnd +r
  5.  
  6.   if ($window(@hidden)) { window -c @hidden }
  7.   window --aihznhw0 @hidden 1 1 0 0
  8.   xdock -m $window(@hidden).hwnd +b
  9. }
  10.  
  11. alias xnick { return $xdid(nlist, 2, 2).seltext }
  12. alias xnicks {
  13.   var %i $xdid(nlist, 2).selnum, %r
  14.   while (%i) { var %r $addtok(%r, $xdid(nlist, 2, $xdid(nlist, 2, %i).sel, 2).text , 44) | dec %i }
  15.   return %r
  16. }
  17.  
  18. ;Triggers
  19. on *:ACTIVE:*: { if ($me ison $active) { xdock -r $dialog(nlist).hwnd + 200 1 | nlist } | else { xdock -r $dialog(nlist).hwnd + 1 1 } }
  20. on *:JOIN:#: { if ($nick == $me) { $iif($dialog(nlist),nlist,nicklist) } |  elseif ($active == #) { nlist } }
  21. on *:PART:#: { if ($active == #) { nlist } }
  22. on *:QUIT:nlist
  23. on *:KICK:#: { if ($active == #) { nlist } }
  24. on *:RAWMODE:#: { if ($active == #) { nlist } }
  25.  
  26. dialog nlist {
  27.   title "Nicklist"
  28.   size -1 -1 225 $window(-2).h
  29.   option pixel
  30. }
  31.  
  32. on *:DIALOG:nlist:init:*:{
  33.   dcx Mark nlist callback_nlist
  34.   xdialog -g $dname +is icons\test1.jpg
  35.   xdialog -c $dname 2 listview 1 1 175 $calc($window(-2).h - 90) report fullrow nolabelwrap noheader transparent tabstop showsel
  36.   xdid -t $dname 2 + 0 20 $null $chr(9) + 0 130  
  37.   xdid -w $dname 2 +n 0 icons\staff.ico
  38.   xdid -w $dname 2 +n 0 icons\owner.ico
  39.   xdid -w $dname 2 +n 0 icons\host.ico
  40.   xdid -w $dname 2 +n 0 icons\voice.ico
  41.   xdid -w $dname 2 +n 0 icons\user.ico
  42.   xdid -w $dname 2 +n 0 icons\spec.ico
  43.   xdid -w $dname 2 +n 0 icons\phreik.ico
  44.  
  45.  
  46.   nlist
  47.  
  48.   ; RIGHT BAR 2
  49.   ; -----------
  50.   xdialog -c $dname 3 toolbar 176 -1 28 $window(-2).h right wrap noauto flat list nodivider
  51.   xdid -l $dname 3 24
  52.   xdid -a $dname 3 1 +c 1 1 | xdid -w $dname 3 +ndh 0 icons\si.ico  
  53.   xdid -a $dname 3 2 +c 1 2 | xdid -w $dname 3 +ndh 0 icons\s1.ico
  54.   xdid -a $dname 3 3 +c 1 3 | xdid -w $dname 3 +ndh 0 icons\s2.ico
  55.   xdid -a $dname 3 4 +c 1 4 | xdid -w $dname 3 +ndh 0 icons\s3.ico
  56.   xdid -a $dname 3 5 +c 1 5 | xdid -w $dname 3 +ndh 0 icons\s4.ico
  57.   xdid -a $dname 3 6 +c 1 6 | xdid -w $dname 3 +ndh 0 icons\s5.ico
  58.   xdid -a $dname 3 7 +c 1 7 | xdid -w $dname 3 +ndh 0 icons\s6.ico
  59.   xdid -a $dname 3 8 +c 1 8 | xdid -w $dname 3 +ndh 0 icons\s0.ico
  60.  
  61.   ;Spacer
  62.   xdid -a $dname 3 9 +cd 1 0
  63.  
  64.   ;Kicks/Bans
  65.   xdid -a $dname 3 10 +c 1 9 | xdid -w $dname 3 +ndh 0 icons\s7.ico
  66.   ; xdid -a $dname 3 11 +c 1 10
  67.   xdid -w $dname 3 +ndh 0 icons\s8.ico
  68.   ; xdid -a $dname 3 12 +c 1 11
  69.   xdid -w $dname 3 +ndh 0 icons\s9.ico
  70.   xdid -a $dname 3 13 +c 1 12 | xdid -w $dname 3 +ndh 0 icons\s10.ico
  71.   xdid -a $dname 3 14 +c 1 13 | xdid -w $dname 3 +ndh 0 icons\s11.ico
  72.   xdid -a $dname 3 15 +c 1 14 | xdid -w $dname 3 +ndh 0 icons\s12.ico
  73.   xdid -a $dname 3 16 +c 1 15 | xdid -w $dname 3 +ndh 0 icons\s13.ico
  74.   xdid -a $dname 3 17 +c 1 16 | xdid -w $dname 3 +ndh 0 icons\s14.ico
  75.  
  76.  
  77. }
  78.  
  79. alias callback_nlist {
  80.   if ($2 == sclick) {
  81.     if ($3 == 3) {
  82.       ;echo -a * Button $4- Clicked | return
  83.       var %sn $xnick,%c $active
  84.       if ($4 == 1) { echo 7 -ti2 %c *  }
  85.       if (%sn == $null) { echo 7 %c * Please select a nick first | return }
  86.       elseif ($4 == 2) { mode %c +q %sn }
  87.       elseif ($4 == 3) { mode %c -qo %sn %sn }
  88.       elseif ($4 == 4) { mode %c +o %sn }
  89.       elseif ($4 == 5) { mode %c -o %sn }
  90.       elseif ($4 == 6) { mode %c +v %sn }
  91.       elseif ($4 == 7) { mode %c -v %sn }
  92.       elseif ($4 == 8) { .Prop %sn PUID }
  93.       elseif ($4 == 10) { kick %c %sn $$?="Kick messge;" }
  94.       elseif ($4 == 11) { aclear | access %c ADD DENY * $+ $ial(%sn,1).user $+ @* 5 : 5min time out | kick %c %sn 5 min time out }
  95.       elseif ($4 == 12) { aclear | access %c ADD DENY * $+ $ial(%sn,1).user $+ @* 15 : 5min time out | kick %c %sn 15 min time out }
  96.       elseif ($4 == 13) { aclear | access %c ADD DENY * $+ $ial(%sn,1).user $+ @* 30 : 5min time out | kick %c %sn 30 min time out }
  97.       elseif ($4 == 14) { aclear | access %c ADD DENY * $+ $ial(%sn,1).user $+ @* 60 : 5min time out | kick %c %sn 60 min time out }
  98.       elseif ($4 == 15) { aclear | access %c ADD DENY * $+ $ial(%sn,1).user $+ @* 1440 : 5min time out | kick %c %sn 24 hour time out }
  99.   } }
  100.   if ($2 == dclick && $3 == 2) { query $xnick }
  101.   ;popup menu call- uses rcyf to popup fake nicklist
  102.   if ($2 == rclick && $3 == 2) {
  103.     ;y offset varies based upon menu size
  104.     var %y $calc($mouse.cy - $window(-2).y + 40), %x $calc($mouse.cx - $window(-2).x)
  105.     dll dlls\rcyf.dll popup $window(@hidden).hwnd %x %y
  106.   }
  107.   ;resize call- adjust size of nicklist
  108.   elseif ($2 == sizing && $4 && $5) {
  109.     var %p $xdid(nlist, 2).pos
  110.     xdid -p nlist 2 $gettok(%p,1-3,32) $5
  111.   }
  112.   halt
  113. }
  114.  
  115. alias aclear { access $active clear owner | access $active clear host }
  116.  
  117. alias nlist {
  118.   xdid -r nlist 2
  119.   var %i 1
  120.   while ($nick($active,%i)) {
  121.     var %n $v1
  122.     if ($left(%n,1) isin ') var %l 1
  123.     elseif (%n == $me) var %l 7
  124.     elseif ($ismode($active,%n,q)) var %l 2
  125.     elseif ($ismode($active,%n,o)) var %l 3
  126.     elseif ($ismode($active,%n,v)) var %l 4
  127.     else var %l $iif(m isin $chan($active).mode,6,5)
  128.     xdid -a nlist 2 0 0 + %l 0 0 0 -1 -1 $chr(9) + 0 0 -1 -1 %n
  129.     inc %i
  130. } }
  131.  
  132.  
  133. menu @hidden {
  134.   $xnick Info
  135.   .Copy Nick $xnick : echo -a * Nickname copyed to clip board: $xnick | clipboard $xnick
  136.   .ScriptCheck: who $xnick
  137.   .Profile:.Prop $xnick PUID
  138.   .UserID $ial($xnick,1).user : echo 7 -a * $xnick User ID $ial($xnick,1).user | clipboard $ial($xnick,1).user
  139.   .$address($xnick,1) : echo 7 -a * $xnick Full gate $address($xnick,1) | clipboard $address($xnick,1)
  140.   -
  141.   $iif($ismode($active,$xnick,q),$style(1)) · $chr(32) Owner: { mode $active $iif($ismode($active,$xnick,q),-q,+q) $xnick  }
  142.   $iif($ismode($active,$xnick,o),$style(1)) · $chr(32) Host: { mode $active $iif($ismode($active,$xnick,o),-o,+o) $xnick }
  143.   $iif($ismode($active,$xnick,v),$style(1)) · $chr(32) Voice: { mode $active $iif($ismode($active,$xnick,v),-v,+v) $xnick }
  144.   -
  145.   CTCP
  146.   .Time:.ctcp  $xnick TIME
  147.   .Version:.ctcp  $xnick VERSION
  148.   .Finger:.ctcp  $xnick FINGER
  149.   -
  150.   Channel Accses
  151.   .Add Owner : ACCESS $active ADD OWNER * $+ $ial($xnick,1).user $+ @* 0 : Miamor Owner Add
  152.   .Remove Owner: ACCESS $active DELETE OWNER * $+ $ial($xnick,1).user $+ @*
  153.   .-
  154.   .Add Host: ACCESS $active ADD HOST * $+ $ial($xnick,1).user $+ @* 0 : Miamor Host Add
  155.   .Remove Host : ACCESS $active DELETE HOST * $+ $ial($xnick,1).user $+ @*
  156.   .-
  157.   .Add Voice: ACCESS $active ADD VOICE * $+ $ial($xnick,1).user $+ @* 0 : Miamor Voice Add
  158.   .Remove Voice: ACCESS $active DELETE VOICE * $+ $ial($xnick,1).user $+ @*
  159.   .-
  160.   .Add Deny: ACCESS $active ADD DENY * $+ $ial($xnick,1).user $+ @* 0 : Miamor Deny Add
  161.   .Remove Deny: ACCESS $active DELETE DENY * $+ $ial($xnick,1).user $+ @*
  162.   -
  163.   Kicks
  164.   .Quick Kick: kick $active $xnick ByeBye
  165.   .Custom Kick: kick $active $xnick $$?="Reason for kick:"
  166.   -
  167.   Bans
  168.   .Quick Ban: { aclear | access $active ADD DENY * $+ $ial($xnick,1).user $+ @* 5 : 5min time out | kick $active $xnick 5 min time out  }
  169.   .Custom Ban: { aclear | access $active ADD DENY * $+ $ial($xnick,1).user $+ @* $$?="How Long?" : Banned | kick $active $xnick $$?="Reason?"  }
  170.   -
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement