Advertisement
makimaki

Nicklist DCX Based (Final)

Feb 8th, 2011
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 6.28 KB | None | 0 0
  1. ;_________________________
  2. ;---= Custom Nicklist =---
  3. ;---=   DCX Based     =---
  4. ;_________________________
  5. ;Created By MakiMaki
  6. ;Images By seraphim
  7. ;Coded By MakiMaki & extremity
  8. ;Thank you to the Following:
  9. ;DCX dev team, err0r, Stealth, ness, MisterAwesome, Lucifer, and to any one I missed, Thank you.
  10. ;This snippet works only with the DCX dev build, and mIRC 7.*  (Copy of both encluded in Zip)
  11. ;Any bugs glitches or thoughts please email MakiMaki1.13@null.net
  12. ;Thankyou and enjoy:)
  13.  
  14. ;Notes Icons path is icons\(filename) change this to what you wish (line 39 - 52 to edit icon file path)
  15. ;DCX Path is dlls\dcx.dll (line 104 to edit this file path)
  16. ;RCYF aka(Righ Click You Fucker) Path is dlls\rcyf.dll (line 97 to edit this file path)
  17.  
  18. ;____________________
  19. ;(----= Dialog =----)
  20. ;____________________
  21.  
  22. dialog nlist {
  23.   title "Nicklist"
  24.   size -1 -1 1 $window(-2).h
  25.   option pixel
  26. }
  27.  
  28. on *:DIALOG:nlist:init:*:{
  29.   dcx Mark nlist callback_nlist
  30.  
  31.   ;Nicklist
  32.   xdialog -c $dname 2 listview 1 -1 175 $calc($window(-2).h - 90) report fullrow nolabelwrap noheader transparent tabstop showsel
  33.  
  34.   ;Sets background color and text color
  35.   xdid -i $dname 2 +bk  $color($color(listbox))
  36.   xdid -i $dname 2 +t  $color($color(listbox text))
  37.  
  38.   ;Icons to return user level
  39.   xdid -t $dname 2 + 0 20 $null $chr(9) + 0 130  
  40.   xdid -w $dname 2 +n 0 icons\wings.ico
  41.   xdid -w $dname 2 +n 0 icons\gold.ico
  42.   xdid -w $dname 2 +n 0 icons\red.ico
  43.   xdid -w $dname 2 +n 0 icons\silver.ico
  44.   xdid -w $dname 2 +n 0 icons\brown.ico
  45.   xdid -w $dname 2 +n 0 icons\voice.ico
  46.   xdid -w $dname 2 +n 0 icons\users.ico
  47.   xdid -w $dname 2 +n 0 icons\spec.ico
  48.   xdid -w $dname 2 +n 0 icons\super.ico
  49.   xdid -w $dname 2 +n 0 icons\meop.ico
  50.   xdid -w $dname 2 +n 0 icons\mevoice.ico
  51.   xdid -w $dname 2 +n 0 icons\meuser.ico
  52.   xdid -w $dname 2 +n 0 icons\cup.ico
  53.  
  54.   nlist
  55. }
  56.  
  57. ;____________________
  58. ;(--= Main Alias =--)
  59. ;____________________
  60.  
  61. alias nicklist {
  62.   if ($dialog(nlist)) { dialog -x nlist }
  63.   dialog -m nlist nlist
  64.   xdock -m $dialog(nlist).hwnd +r
  65.   ;Fake Window to use for nicklist menu
  66.   if ($window(@hidden)) { window -c @hidden }
  67.   window --aihznhw0 @hidden 1 1 0 0
  68.   xdock -m $window(@hidden).hwnd +b
  69. }
  70.  
  71. alias nlist {
  72.   if (!$dialog(nlist)) { nicklist }
  73.   xdid -r nlist 2
  74.   xdid -i nlist 2 +bk  $color($color(listbox)) | xdid -i nlist 2 +t  $color($color(listbox text))
  75.   var %i 1
  76.   while ($nick($active,%i)) {
  77.     var %n $v1
  78.     if ($left(%n,1) isin '^) var %l 1
  79.     elseif ($ismode($active,%n,Q)) var %l $iif($me = %n,10,9)
  80.     elseif ($ismode($active,%n,q)) var %l $iif($me = %n,10,2)
  81.     elseif ($ismode($active,%n,a)) var %l $iif($me = %n,10,3)
  82.     elseif ($ismode($active,%n,o)) var %l $iif($me = %n,10,4)
  83.     elseif ($ismode($active,%n,h)) var %l $iif($me = %n,10,5)
  84.     elseif ($ismode($active,%n,v)) var %l $iif($me = %n,11,6)
  85.     else var %l $iif(m isin $chan($active).mode,8,$iif($me = %n,12,7))
  86.     xdid -a nlist 2 0 0 + %l 0 0 0 -1 -1 $chr(9) + 0 0 -1 -1 %n
  87.     inc %i
  88. } }
  89.  
  90. alias callback_nlist {
  91.   ;Nicklist clicks
  92.   if ($2 == dclick && $3 == 2) { query $xnick }
  93.   ;popup menu call- uses rcyf to popup fake nicklist
  94.   if ($2 == rclick && $3 == 2) {
  95.     ;y offset varies based upon menu size
  96.     var %y $calc($mouse.cy - $window(-2).y + 40), %x $calc($mouse.cx - $window(-2).x)
  97.     dll dlls\rcyf.dll popup $window(@hidden).hwnd %x %y
  98.   }
  99.   ;resize call- adjust size of nicklist
  100.   elseif ($2 == sizing && $4 && $5) { var %p $xdid(nlist, 2).pos | xdid -p nlist 2 $gettok(%p,1-3,32) $5 }
  101.   halt
  102. }
  103.  
  104. alias dcx { if ($isid) returnex $dll($shortfn($mircdir) $+ dlls\dcx.dll,$1,$2-) | else dll " $+ $shortfn($mircdir) $+ dlls\dcx.dll" $1 $2- }
  105.  
  106. alias udcx { if ($dcx(IsUnloadSafe)) $iif($menu, .timer 1 0) dll -u dcx.dll | else echo 4 -qmlbfti2 [DCX] Unable to Unload Dll. }
  107.  
  108. alias xdid { if ( $isid ) returnex $dcx( _xdid, $1 $2 $prop $3- ) | dcx xdid $2 $3 $1 $4- }
  109.  
  110. alias xdialog { if ( $isid ) returnex $dcx( _xdialog, $1 $prop $2- ) | dcx xdialog $2 $1 $3- }
  111.  
  112. alias xdock { if ($isid) returnex $dcx( _xdock, $1 $prop $2- ) | dcx xdock $1- }
  113.  
  114. alias ismode return $iif($nick($1,$2,$mid($prefix,$poscs($nickmode,$3),1)),$true,$false)
  115.  
  116.  
  117. ;____________________
  118. ;(---= Triggers =---)
  119. ;____________________
  120.  
  121. on *:JOIN:#: { if ($active == #) { .timer -m 1 50 nlist } }
  122.  
  123. on *:PART:#: { if ($active == #) { .timer -m 1 50 nlist } }
  124.  
  125. on *:KICK:#: { if ($active == #) { .timer -m 1 50 nlist } }
  126.  
  127. on *:RAWMODE:#: { if ($active == #) { .timer -m 1 50 nlist } }
  128.  
  129. on *:QUIT: { if ($comchan($nick,0) == $active) { .timer -m 1 50 nlist } }
  130.  
  131. on *:NICK: { if ($comchan($newnick,0) == $active) { .timer -m 1 50 nlist } }
  132.  
  133. on *:ACTIVE:*: {
  134.   if ($me ison $active) { xdock -r $dialog(nlist).hwnd + 207 1 | nlist }
  135.   else { xdock -r $dialog(nlist).hwnd + 1 1 }
  136. }
  137.  
  138. ;____________________
  139. ;(-----= Menu =-----)
  140. ;____________________
  141.  
  142. ;Nicklist Menu alias
  143. alias xnick { return $xdid(nlist, 2, 2).seltext }
  144.  
  145. alias xnicks {
  146.   var %i $xdid(nlist, 2).selnum, %r
  147.   while (%i) { var %r $addtok(%r, $xdid(nlist, 2, $xdid(nlist, 2, %i).sel, 2).text , 44) | dec %i }
  148.   return %r
  149. }
  150.  
  151. menu @hidden {
  152.   $xnick Info
  153.   .Copy Nick $xnick : echo -a * Nickname copyed to clip board: $xnick | clipboard $xnick
  154.   .Whois: whois $xnick
  155.   .UserID $ial($xnick,1).user : echo 7 -a * $xnick User ID $ial($xnick,1).user | clipboard $ial($xnick,1).user
  156.   .$address($xnick,1) : echo 7 -a * $xnick Full gate $address($xnick,1) | clipboard $address($xnick,1)
  157.   -
  158.   $iif($ismode($active,$xnick,q),$style(1)) · $chr(32) Owner: { mode $active $iif($ismode($active,$xnick,q),-q,+q) $xnick  }
  159.   $iif($ismode($active,$xnick,a),$style(1)) · $chr(32) Admin: { mode $active $iif($ismode($active,$xnick,a),-a,+a) $xnick  }
  160.   $iif($ismode($active,$xnick,o),$style(1)) · $chr(32) Host: { mode $active $iif($ismode($active,$xnick,o),-o,+o) $xnick }
  161.   $iif($ismode($active,$xnick,h),$style(1)) · $chr(32) Halfop: { mode $active $iif($ismode($active,$xnick,h),-h,+h) $xnick  }
  162.   $iif($ismode($active,$xnick,v),$style(1)) · $chr(32) Voice: { mode $active $iif($ismode($active,$xnick,v),-v,+v) $xnick }
  163.   -
  164.   CTCP
  165.   .Time:.ctcp  $xnick TIME
  166.   .Version:.ctcp  $xnick VERSION
  167.   .Finger:.ctcp  $xnick FINGER
  168.   -
  169.   Kicks
  170.   .Quick Kick: kick $active $xnick ByeBye
  171.   .Custom Kick: kick $active $xnick $$?="Reason for kick:"
  172.   -
  173. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement