mIRC Home    About    Download    Register    News    Help

Print Thread
#270834 09/10/22 02:20 PM
Joined: Sep 2022
Posts: 5
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Sep 2022
Posts: 5
i use an AKA mirc script this gives every time in every chat window the aka of a chatter, i would like to lead this after a seperate room #aka not

in the room : https://prnt.sc/75Ecq7qCyHLw
in a window : https://prnt.sc/GeEhu5reeuOU

but really want to have it in the room #aka!






;*****************************************************************************;
;**Start Setup
;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
alias -l JoinDisplay { return 1 }
;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
alias -l MaxNicks { return 10 }
;Change AKALogo, below, To the text you want displayed before each AKA result.
alias -l AKALogo { return 06 05A06K07A 06 }
;**End Setup
;*****************************************************************************;
On *:Join:#: {
if ($nick == $me) { .enable #AKAInit | who $chan }
NickNamesAdd $nick $+($network,$wildsite)
if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
}
on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
alias -l NickNames.display {
if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
echo -gt $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2)
if (!$window($+(@AKA.,$network,.,$cid))) window -n @AKA. [ $+ [ $network ] ] $+ . [ $+ [ $cid ] ]
echo $+(@AKA.,$network,.,$cid) $timestamp $AKALogo $+(09,$1) joinde $2 en kennen we als 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2) | halt
}
}
alias -l NickNamesAdd {
if ($hget(NickNames,$2)) {
if (!$regex($hget(NickNames,$2),/~\Q $+ $1 $+ \E~/i)) {
if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
}
else {
hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
}
}
}
else {
hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
}
}
alias -l Fix.All.MindUser {
var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,0,r).data
while (%Fix.Count) {
if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data))) {
echo -ag Record %Fix.Count - $v1 - Was Cleaned
hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data $v1
}
dec %Fix.Count
}
}
alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}[~$]/g,$null) }
menu nicklist {
-
.AKA
..Check $$1: {
if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
NickNames.display $1 $active $network $address($1,2)
}
else { echo -ag $AKALogo $+(09,$1) 07kent nog geen andere namen sinds ik kijk. }
}
..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
-
}
menu status,channel {
-
.AKA
..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
..Clean All Records:Fix.All.Minduser
-
}
dialog AKA_Search {
title "AKA Search Engine"
size -1 -1 206 221
option dbu
edit "", 1, 8 5 149 10, autohs
button "Search", 2, 163 4 32 12
radio "Search HostMask", 4, 61 22 55 10
radio "Search Nicknames", 5, 123 22 56 10
list 6, 8 38 190 169, sort extsel vsbar
button "Check Selected", 7, 67 206 40 12
button "Close", 8, 160 206 38 12, cancel
box "Search Type", 3, 11 17 183 18
button "Copy to Clipboard", 9, 111 206 46 12
}
On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
On *:Dialog:Aka_Search:Sclick:2,7,9: {
if ($did == 2) && ($did($dname,1)) {
did -r $dname 6
var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
while (%matches) {
did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
dec %matches
}
did -c $dname 6 1
}
elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
}
On *:Start:{
if (!$hget(NickNames)) { hmake NickNames 10 }
if ($isfile(NickNames.hsh)) { hload NickNames NickNames.hsh }
}
On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Unload: { hfree NickNames }
#AKAInit off
Raw 352:*: { haltdef | NickNamesAdd $6 $+($network,$address($6,2)) }
Raw 315:*: { haltdef | .disable #AKAInit }
#AKAInit End


-----------------------------------------------------------------------------------
irc.chattersplaza.nl:+6697

#MirCScript


Connect with Mirc

irc.chattersplaza.nl:+6697

Join Chanel

/j #MirCScript

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Reminder that it's a big help to use the # icon in the post template to paste your alias inside a CODE block, as some people won't even look at the script because it's really hard to read long scripts without doing that.

Your alias is using /echo to output the display to $2, and your alias is called with $2 being the channel they joined, as the command:

NickNames.display $nick $chan $network $wildsite

You can replace $chan with the literal #AKA if you want it to go there instead, though the script should make certain that $window($2) exists before sending output to it, otherwise the #channel string is treated like some random #word to be echoed instead of being the destination.

Something else about your script. It appears that the AKA's are listed in the order in which they were first seen, so if you want them to instead be alphabetical order, find

$hget(NickNames,$+($3,$4))

and change to

$sorttok($hget(NickNames,$+($3,$4)),126)

Joined: Sep 2022
Posts: 5
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Sep 2022
Posts: 5
[quote=infinity]i use an AKA mirc script this gives every time in every chat window the aka of a chatter, i would like to lead this after a seperate room #aka not

in the room : https://prnt.sc/75Ecq7qCyHLw
in a window : https://prnt.sc/GeEhu5reeuOU

but really want to have it in the room #aka!


Code
;*****************************************************************************;
;**Start Setup
;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
alias -l JoinDisplay { return 1 }
;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
alias -l MaxNicks { return 10 }
;Change AKALogo, below, To the text you want displayed before each AKA result.
alias -l AKALogo { return 06 05A06K07A 06 }
;**End Setup
;*****************************************************************************;
On *:Join:#: {
  if ($nick == $me) { .enable #AKAInit | who $chan }
  NickNamesAdd $nick $+($network,$wildsite)
  if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
}
on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
alias -l NickNames.display {
  if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
    echo -gt $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2)
    if (!$window($+(@AKA.,$network,.,$cid))) window -n @AKA. [ $+ [ $network ] ] $+ . [ $+ [ $cid ] ]
    echo $+(@AKA.,$network,.,$cid) $timestamp $AKALogo $+(09,$1) joinde $2 en kennen we als 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2) | halt
  }
}
alias -l NickNamesAdd {
  if ($hget(NickNames,$2)) {
    if (!$regex($hget(NickNames,$2),/~\Q $+ $1 $+ \E~/i)) {
      if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
        hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
      }
      else {
        hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
      }
    }
  }
  else {
    hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
  }  
}
alias -l Fix.All.MindUser {
  var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,0,r).data
  while (%Fix.Count) {
    if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data))) {
      echo -ag Record %Fix.Count - $v1 - Was Cleaned
      hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data $v1
    }
    dec %Fix.Count
  }
}
alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}[~$]/g,$null) }
menu nicklist {
  -
  .AKA
  ..Check $$1: {
    if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
      NickNames.display $1 $active $network $address($1,2)
    }
    else { echo -ag $AKALogo $+(09,$1) 07kent nog geen andere namen sinds ik kijk. }
  }
  ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
  ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  -
}
menu status,channel {
  -
  .AKA  
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  ..Clean All Records:Fix.All.Minduser
  -  
}
dialog AKA_Search {
  title "AKA Search Engine"
  size -1 -1 206 221
  option dbu
  edit "", 1, 8 5 149 10, autohs
  button "Search", 2, 163 4 32 12
  radio "Search HostMask", 4, 61 22 55 10
  radio "Search Nicknames", 5, 123 22 56 10
  list 6, 8 38 190 169, sort extsel vsbar
  button "Check Selected", 7, 67 206 40 12
  button "Close", 8, 160 206 38 12, cancel
  box "Search Type", 3, 11 17 183 18
  button "Copy to Clipboard", 9, 111 206 46 12
}
On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
On *:Dialog:Aka_Search:Sclick:2,7,9: {
  if ($did == 2) && ($did($dname,1)) {
    did -r $dname 6
    var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
    while (%matches) {
      did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
      dec %matches
    }
    did -c $dname 6 1  
  }
  elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
  elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
}
On *:Start:{
  if (!$hget(NickNames)) { hmake NickNames 10 }
  if ($isfile(NickNames.hsh)) { hload  NickNames NickNames.hsh }
}
On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Unload: { hfree NickNames }
#AKAInit off
Raw 352:*: { haltdef | NickNamesAdd $6 $+($network,$address($6,2))  }
Raw 315:*: { haltdef | .disable #AKAInit }
#AKAInit End

Last edited by infinity; 10/10/22 09:12 PM.

Connect with Mirc

irc.chattersplaza.nl:+6697

Join Chanel

/j #MirCScript

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
close but not quite. you didn't actually put the code inside the code block. clicking on the 'code' item in the "#" icon puts the start/end symbols for the code block into your post. You can make a blank line between them, and that's where you paste your code. Or, you can first paste your indented code, then highlight the block, and then click to put the code block symbols around it.

Also, pasted code should come from the scripts editor where it's indented, rather than pasting from somewhere else where the indents were lost.

Joined: Sep 2022
Posts: 5
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Sep 2022
Posts: 5
[quote=infinity]i use an AKA mirc script this gives every time in every chat window the aka of a chatter, i would like to lead this after a seperate room #aka not

in the room : https://prnt.sc/75Ecq7qCyHLw
in a window : https://prnt.sc/GeEhu5reeuOU

but really want to have it in the room #aka!






Code
;*****************************************************************************;
;**Start Setup
;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
alias -l JoinDisplay { return 1 }
;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
alias -l MaxNicks { return 10 }
;Change AKALogo, below, To the text you want displayed before each AKA result.
alias -l AKALogo { return 06 05A06K07A 06 }
;**End Setup
;*****************************************************************************;
On *:Join:#: {
  if ($nick == $me) { .enable #AKAInit | who $chan }
  NickNamesAdd $nick $+($network,$wildsite)
  if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
}
on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
alias -l NickNames.display {
  if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
    echo -gt $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2)
    if (!$window($+(@AKA.,$network,.,$cid))) window -n @AKA. [ $+ [ $network ] ] $+ . [ $+ [ $cid ] ]
    echo $+(@AKA.,$network,.,$cid) $timestamp $AKALogo $+(09,$1) joinde $2 en kennen we als 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44) $+ $chr(32)),2,-2) | halt
  }
}
alias -l NickNamesAdd {
  if ($hget(NickNames,$2)) {
    if (!$regex($hget(NickNames,$2),/~\Q $+ $1 $+ \E~/i)) {
      if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
        hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
      }
      else {
        hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
      }
    }
  }
  else {
    hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
  }  
}
alias -l Fix.All.MindUser {
  var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,0,r).data
  while (%Fix.Count) {
    if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data))) {
      echo -ag Record %Fix.Count - $v1 - Was Cleaned
      hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data $v1
    }
    dec %Fix.Count
  }
}
alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}[~$]/g,$null) }
menu nicklist {
  -
  .AKA
  ..Check $$1: {
    if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
      NickNames.display $1 $active $network $address($1,2)
    }
    else { echo -ag $AKALogo $+(09,$1) 07kent nog geen andere namen sinds ik kijk. }
  }
  ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
  ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  -
}
menu status,channel {
  -
  .AKA  
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  ..Clean All Records:Fix.All.Minduser
  -  
}
dialog AKA_Search {
  title "AKA Search Engine"
  size -1 -1 206 221
  option dbu
  edit "", 1, 8 5 149 10, autohs
  button "Search", 2, 163 4 32 12
  radio "Search HostMask", 4, 61 22 55 10
  radio "Search Nicknames", 5, 123 22 56 10
  list 6, 8 38 190 169, sort extsel vsbar
  button "Check Selected", 7, 67 206 40 12
  button "Close", 8, 160 206 38 12, cancel
  box "Search Type", 3, 11 17 183 18
  button "Copy to Clipboard", 9, 111 206 46 12
}
On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
On *:Dialog:Aka_Search:Sclick:2,7,9: {
  if ($did == 2) && ($did($dname,1)) {
    did -r $dname 6
    var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
    while (%matches) {
      did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
      dec %matches
    }
    did -c $dname 6 1  
  }
  elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
  elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
}
On *:Start:{
  if (!$hget(NickNames)) { hmake NickNames 10 }
  if ($isfile(NickNames.hsh)) { hload  NickNames NickNames.hsh }
}
On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Unload: { hfree NickNames }
#AKAInit off
Raw 352:*: { haltdef | NickNamesAdd $6 $+($network,$address($6,2))  }
Raw 315:*: { haltdef | .disable #AKAInit }
#AKAInit End


Connect with Mirc

irc.chattersplaza.nl:+6697

Join Chanel

/j #MirCScript

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Yay, success!
now you know how to do it going forward.
As for this specific issue, I had already answered you in your channel. The problem was that your alias is sending the string to the $2 parameter, and you're always calling it with the $2 parameter being the $chan that they joined. If you called the alias using the literal #AKA instead of using $chan, the display would go there instead of the channel they're joining.

Joined: Jan 2018
Posts: 6
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Joined: Jan 2018
Posts: 6
For what it's worth, I found a good AKA script online, and modified it to colour the output to my tastes and output to a separate window (like I believe your aiming for)

Here's what I use:

Code
;AKA Nick Tracker 
;  Original script by Ford_Lawnmower irc.mindforge.org #USA-Chat
;   Modified by Carolyn M (output to a separate window and colour adjustments)
;
;*****************************************************************************;
;**Start Setup
;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
alias -l JoinDisplay { return 1 }
;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
alias -l MaxNicks { return 20 }
;Change AKALogo, below, To the text you want displayed before each AKA result.
alias -l AKALogo { return 06 11A87K11A 06 }
;**End Setup
;*****************************************************************************;
On *:Join:#: {
  if ($nick == $me) { .enable #AKAInit | who $chan }
  NickNamesAdd $nick $+($network,$wildsite)
  if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
}
on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
alias -l NickNames.display {
  if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {

    if ($window(@AKAwindow) == $null) {
      window -ae0k0 @AKAwindow -1 -1 -1 -1
    }

    echo -g @AKAwindow 04 $time(HHnnss) 10 $2 $AKALogo $+(09,$1) $AKALogo 59 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44)),2,-1)
  }
}
alias -l NickNamesAdd {
  if ($hget(NickNames,$2)) {
    if (!$regex($hget(NickNames,$2),/~\Q $+ $1 $+ \E~/i)) {
      if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
        hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
      }
      else {
        hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
      }
    }
  }
  else {
    hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
  }  
}
alias -l Fix.All.MindUser {
  var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,0,r).data
  while (%Fix.Count) {
    if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data))) {
      if ($window(@AKAwindow) == $null) {
        window -ae0k0 @AKAwindow -1 -1 -1 -1
      }

      echo -a @AKAwindow 04 $time(HHnnss) Record %Fix.Count - $v1 - Was Cleaned
      hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}[~$]/,%Fix.Count,r).data $v1
    }
    dec %Fix.Count
  }
}
alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}[~$]/g,$null) }
menu nicklist {
  -
  .AKA
  ..Check $$1: {
    if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
      NickNames.display $1 $active $network $address($1,2)
    }
    else { 
      if ($window(@AKAwindow) == $null) {
        window -ae0k0 @AKAwindow -1 -1 -1 -1
      }

      echo -g @AKAwindow 04 $time(HHnnss) $AKALogo $+(09,$1) 62No AKA's found
    }
  }
  ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
  ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  -
}
menu status,channel {
  -
  .AKA  
  ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  ..Clean All Records:Fix.All.Minduser 
  -   
}
dialog AKA_Search {
  title "AKA Search Engine"
  size -1 -1 206 221
  option dbu
  edit "", 1, 8 5 149 10, autohs
  button "Search", 2, 163 4 32 12
  radio "Search HostMask", 4, 61 22 55 10
  radio "Search Nicknames", 5, 123 22 56 10
  list 6, 8 38 190 169, sort extsel vsbar
  button "Check Selected", 7, 67 206 40 12
  button "Close", 8, 160 206 38 12, cancel
  box "Search Type", 3, 11 17 183 18
  button "Copy to Clipboard", 9, 111 206 46 12
}
On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
On *:Dialog:Aka_Search:Sclick:2,7,9: {
  if ($window(@AKAwindow) == $null) {
    window -ae0k0 @AKAwindow -1 -1 -1 -1
  }

  if ($did == 2) && ($did($dname,1)) {
    did -r $dname 6
    var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
    while (%matches) {
      did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
      dec %matches
    }
    did -c $dname 6 1   
  }
  elseif ($did == 7) && ($did($dname,6).seltext) { 
    echo -g @AKAwindow 04 $time(HHnnss) $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) 
  }
  elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
}
On *:Start:{
  if (!$hget(NickNames)) { hmake NickNames 10 }
  if ($isfile(NickNames.hsh)) { hload  NickNames NickNames.hsh }
}
On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } } 
On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
On *:Unload: { hfree NickNames }
#AKAInit off
Raw 352:*: { haltdef | NickNamesAdd $6 $+($network,$address($6,2))  }
Raw 315:*: { haltdef | .disable #AKAInit }
#AKAInit End

I hope this helps smile


Mistress Carolyn
Long time user and supporter of mIRC

Link Copied to Clipboard