Address finder

By Matt5150 on Sep 07, 2017

With this script you can search for a nick/address using $ial (internal address list).

Usage:

/faddr matt*
Result:
matt* (1) on freenode is:
1) Matt5150 - ~Matt@unaffiliated/matt5150

/faddr *@unaff*
Result:
@unaff (21) on freenode is:
1) alphis - ~noone@unaffiliated/alphis
2) andmars - ~andreas@unaffiliated/andmars
3) Daekdroom - ~Daekdroom@unaffiliated/daekdroom
ecc.. ecc..

Note: works on muli-networks, type /scid -a faddr *test*

alias faddr {
  if (!$window(@Address)) { window -azdBke2 @Address $calc($window(-1).w /2 -250) $calc($window(-1).h /2 -125) 500 250 }
  if ($1) { search.addr $1- }
}
on *:INPUT:@Address: { if ($left($1,1) != /) && (!$ctrlenter) { search.addr $1- } }
alias search.addr {
  var %:adr = $1-, %:a = 1
  aline -h @Address $chr(160)
  $iif($ial(%:adr,0),aline -h 4 @Address %:adr $+($chr(40),$v1,$chr(41)) on $network is:,aline -h 4 @Address %:adr no address found on $network)
  while (%:a <= $ial(%:adr,0)) {
    aline -h 15 @Address $+(%:a,$chr(41)) $+(14,$ial(%:adr,%:a).nick,) - $ial(%:adr,%:a).addr
    inc %:a
  }
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.