Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on $*:text:$($nicka_reg):#:{
- nicka_try $1-
- }
- on $*:action:$($nicka_reg):#:{
- nicka_try $1-
- }
- alias -l nicka_try {
- ; $1- = message
- if (((!$appactive) || ($cid !== $activecid) || ($active !== $chan)) && (!$nickalert_isexcluded($nick))) {
- nick.alert $1-
- }
- }
- alias -l nicka_reg {
- ; !$1-
- if ($hget(temp,$+($cid,.mynickalert)) !== $null) { return $v1 }
- tokenize 32 /(?<![[:alpha:]]) $+ $nicka_others $+ (?![[:alpha:]])/iS
- hadd temp $+($cid,.mynickalert) $1-
- return $1-
- }
- alias -l nicka_others {
- ; !$1-
- var %k
- if (($dat(network,$getnet).exists) && ($dat(network,$getnet).alertnicks !== n/a)) {
- %k = $v1
- }
- var %i = 1,%o = $numtok(%k,32),%r = $+($chr(40),$regrem($me)) | while (%i <= %o) {
- %r = $+(%r,$chr(124),$regrem($gettok(%k,%i,32)))
- inc %i
- }
- %r = $+(%r,$chr(41))
- return %r
- }
- alias -l nickalert_isexcluded {
- ; $1 = nick
- var %k = $inf(nickalert,exclude),%o = $numtok(%k,44) | while (%o) {
- if ($gettok(%k,%o,44) iswm $1) { return 1 }
- dec %o
- }
- }
- alias -l nick.alert {
- if (($inf(nickalert,window)) && ((!$appactive) || (!$inf(nickalert,windowifinactive)))) { var %window = 1 }
- else { var %window }
- var %line
- if ((%window) || ($cid !== $activecid) || ($active !== $chan)) {
- if (%window) {
- if (!$window(@messages)) {
- window -Dinzk0 @messages
- logcustomwindow @messages
- }
- %line = echo $color($event) -tm @messages $c(1) $+ $cbrack($servname) $+ $cbrack($chan) $+
- }
- else {
- %line = echo $color($event) -atm $c(1) $+ $iif(($cid !== $activecid),$cbrack($servname)) $+ $cbrack($chan) $+
- }
- }
- elseif (!$appactive) {
- %line = echo $color($event) -stm $c(1) $+ $cbrack($chan) $+
- }
- if (%line !== $null) {
- if ($event == action) { %line $chanaction($1-) }
- else { %line $nb $1- }
- }
- .signal nickalert $chan $iff($chan($chan).wid,$wid) $nick $1-
- }
Add Comment
Please, Sign In to add comment