nick search/lister

By PuNkTuReD on Feb 08, 2010

Open by pressing F1

When the dialog opens it will list all the nicks,
which are in channels you are in.

When you start typing a nick into the edit field,
it will list nicks matching the given nick.

If you double click a nick in the list,
it will open a query window.

NOTE:
if F1 does not work for you,
add this to the script:

menu * {
Nick Search/Lister: dialog -dm _nick.center _nick.center
}

/*
Nick Search/Lister
By PuNkTuReD
http://www.sassirc.com
*/

alias F1 dialog -dm _nick.center _nick.center
dialog _nick.center {
  title "Nick Search"
  size -1 -1 70 117
  option dbu
  edit "", 1, 5 5 60 10, autohs
  list 2, 5 17 60 100, autohs
}
on *:dialog:_nick.center:*:*: {
  if ($DEVENT == INIT) { _get.match }
  if ($DEVENT == EDIT) {
    if ($DID == 1) { _get.match $did(_nick.center,1) }
  }
  if ($DEVENT == DCLICK) {
    if ($DID == 2) { query $did(_nick.center,2).seltext }
  }
}
alias _get.match {
  did -r _nick.center 2
  write -c tempnicks.txt
  var %a $1, %b $chan(0)
  while (%b) {
    var %c $nick($chan(%b),0)
    while (%c) {
      if ($left($nick($chan(%b),%c),$len(%a)) == %a) {
        if ($read(tempnicks.txt,w,$nick($chan(%b),%c))) {  }
        else { write tempnicks.txt $nick($chan(%b),%c) }
        dec %c
      }
      else { dec %c }
    }
    dec %b
  }
  _fill.list
}
alias _fill.list {
  var %a $lines(tempnicks.txt)
  while (%a) { did -a _nick.center 2 $read(tempnicks.txt,%a) | dec %a }
}

Comments

Sign in to comment.
slub77   -  Feb 09, 2010

0-0, i ment as in just a quick feature 0-0.
Like an add on

 Respond  
Jethro   -  Feb 08, 2010

Slub77, I think you are in over your head these days on dialogs. If people know about dialogs with fair knowledge in MSL, they can easily transfer this script to their own favorite ones.

 Respond  
slub77   -  Feb 08, 2010

Awesome, you should make this just pure alias, and allow people to use it in there dialogs

 Respond  
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.