Guest User

Untitled

a guest
Feb 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.90 KB | None | 0 0
  1. on $*:text:$($nicka_reg):#:{
  2.   nicka_try $1-
  3. }
  4. on $*:action:$($nicka_reg):#:{
  5.   nicka_try $1-
  6. }
  7. alias -l nicka_try {
  8.   ; $1- = message
  9.   if (((!$appactive) || ($cid !== $activecid) || ($active !== $chan)) && (!$nickalert_isexcluded($nick))) {
  10.     nick.alert $1-
  11.   }
  12. }
  13. alias -l nicka_reg {
  14.   ; !$1-
  15.   if ($hget(temp,$+($cid,.mynickalert)) !== $null) { return $v1 }
  16.   tokenize 32 /(?<![[:alpha:]]) $+ $nicka_others $+ (?![[:alpha:]])/iS
  17.   hadd temp $+($cid,.mynickalert) $1-
  18.   return $1-
  19. }
  20. alias -l nicka_others {
  21.   ; !$1-
  22.   var %k
  23.   if (($dat(network,$getnet).exists) && ($dat(network,$getnet).alertnicks !== n/a)) {
  24.     %k = $v1
  25.   }
  26.   var %i = 1,%o = $numtok(%k,32),%r = $+($chr(40),$regrem($me)) | while (%i <= %o) {
  27.     %r = $+(%r,$chr(124),$regrem($gettok(%k,%i,32)))
  28.     inc %i
  29.   }
  30.   %r = $+(%r,$chr(41))
  31.   return %r
  32. }
  33. alias -l nickalert_isexcluded {
  34.   ; $1 = nick
  35.   var %k = $inf(nickalert,exclude),%o = $numtok(%k,44) | while (%o) {
  36.     if ($gettok(%k,%o,44) iswm $1) { return 1 }
  37.     dec %o
  38.   }
  39. }
  40. alias -l nick.alert {
  41.   if (($inf(nickalert,window)) && ((!$appactive) || (!$inf(nickalert,windowifinactive)))) { var %window = 1 }
  42.   else { var %window }
  43.   var %line
  44.   if ((%window) || ($cid !== $activecid) || ($active !== $chan)) {
  45.     if (%window) {
  46.       if (!$window(@messages)) {
  47.         window -Dinzk0 @messages
  48.         logcustomwindow @messages
  49.       }
  50.       %line = echo $color($event) -tm @messages $c(1) $+ $cbrack($servname) $+ $cbrack($chan) $+ 
  51.     }
  52.     else {
  53.       %line = echo $color($event) -atm $c(1) $+ $iif(($cid !== $activecid),$cbrack($servname)) $+ $cbrack($chan) $+ 
  54.     }
  55.   }
  56.   elseif (!$appactive) {
  57.     %line = echo $color($event) -stm $c(1) $+ $cbrack($chan) $+ 
  58.   }
  59.   if (%line !== $null) {
  60.     if ($event == action) { %line $chanaction($1-) }
  61.     else { %line $nb $1- }
  62.   }
  63.   .signal nickalert $chan $iff($chan($chan).wid,$wid) $nick $1-
  64. }
Add Comment
Please, Sign In to add comment