SaNCaK

mIRC Op Notice Window

Jul 31st, 2020 (edited)
2,952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.53 KB | None | 0 0
  1. alias winCreate {
  2.   if (!$2) { return }
  3.   window -ankeSl13 $1
  4.   updateOps $2 $1
  5. }
  6. alias updateOps {
  7.   if (!$2) { return }
  8.   if (!$window($2)) { .timer $+ $2 off }
  9.  
  10.   if ($window($2)) {
  11.     .clear -l $2
  12.     titlebar $2 [[ $+ $nick($1,0,o) $+ ]] @Ops
  13.  
  14.     var %i = $nick($1,0,o)
  15.     while (%i) {
  16.       .aline -l $2 @ $+ $nick($1,%i,o)
  17.       dec %i
  18.     }
  19.   }
  20. }
  21. #zonotice on
  22. on *:PART:#: {
  23.   var %WinID = $+(@Ops,-,$chan)
  24.   .timer 1 1 updateOps $chan %winID    
  25. }
  26. on *:QUIT: {
  27.   var %WinID = $+(@Ops,-,$chan)
  28.   .timer 1 1 updateOps $chan %winID    
  29. }
  30. on *:KICK:# {
  31.   var %WinID = $+(@Ops,-,$chan)
  32.   .timer 1 1 updateOps $chan %winID    
  33. }
  34. on *:OP:# {
  35.   var %WinID = $+(@Ops,-,$chan)
  36.   .timer 1 1 updateOps $chan %winID    
  37. }
  38. on *:DEOP:# {
  39.   var %WinID = $+(@Ops,-,$chan)
  40.   .timer 1 1 updateOps $chan %winID    
  41. }
  42. on ^*:NOTICE:*:# {
  43.   var %WinID = $+(@Ops,-,$chan)
  44.   if ($left($target,1) == @) {
  45.     if (!$window(%WinID)) { winCreate %WinID $chan }
  46.     .aline %winID $timestamp < $+ $nick $+ > $$1-
  47.     window -g1 %winID
  48.     haltdef
  49.   }
  50. }
  51. on ^*:ACTION:*:# {
  52.   var %WinID = $+(@Ops,-,$chan)
  53.   if ($left($target,1) == @) {
  54.     if (!$window(%WinID)) { winCreate %WinID $chan }
  55.     window -g1 %winID
  56.     .aline %winID $timestamp * $nick $$1-
  57.     haltdef
  58.   }
  59. }
  60.  
  61. on *:CLOSE:@: {
  62.   if (@Ops- isin $target) {
  63.     .timer $+ $target off
  64.   }
  65. }
  66.  
  67. on *:INPUT:@Ops-*: {
  68.   if ($1 == /me) {
  69.     if ($me isop $gettok($target,2-,$asc(-))) {
  70.       .describe @ $+ $gettok($target,2-,$asc(-)) $$1-
  71.       .aline $target $timestamp * $me $$2-
  72.       haltdef
  73.       halt
  74.     }
  75.   }
  76.  
  77.   if ($left($1,1) != / || ($left($1,1) == / && $ctrlenter)) {
  78.     if ($me isop $gettok($target,2-,$asc(-))) {
  79.       .notice @ $+ $gettok($target,2-,$asc(-)) $$1-
  80.       .aline $target $timestamp < $+ $me $+ > $$1-
  81.       haltdef
  82.       halt
  83.     }
  84.   }
  85. }
  86. #znotice end
  87.  
  88. menu status,channel,menubar {
  89.   $iif($group(#zonotice).status == on,$style(1),$style(0)) $+ Use Opnotice Window: $iif($group(#zonotice).status == on,.disable,.enable) #zonotice
  90. }
  91.  
  92. menu @Ops-* {
  93.   dclick: if ($mouse.lb == $true) { query $remove($sline($active,1),@) }
  94.   $iif(!$mouse.lb, &Clear): clear $active
  95.   -
  96.   $iif(!$mouse.lb, &Close): window -c $active
  97. }
  98.  
  99. alias onotice {
  100.   var %WinID = $+(@Ops,-,$active)
  101.   if ($group(#zonotice).status == on) {
  102.     if (!$window(%WinID)) { winCreate %WinID $chan }
  103.     .notice @ $+ $gettok(%winID,2-,$asc(-)) $$1-
  104.     .aline %winID $timestamp < $+ $me $+ > $$1-
  105.     halt
  106.   }
  107.   else {
  108.     onotice $1-
  109.   }
  110. }
Add Comment
Please, Sign In to add comment