Instinct Completion

By Jared on May 03, 2006

Paste on Remotes and type /nc to configure your own nick completion

on *:input:#: {
  if ($left($1,1) != $chr(47)) {
    var %acro 1
    var %text $1-
    while (%acro <= $numtok(%text,32)) {
      if ($gettok(%text,%acro,32) ison $chan) { 
        var %nick = $nick($chan,$nick($chan,$ifmatch))
      var %text = $replace(%text,%nick,$+(,%nc1,%nick,%nc2 $+ ,)) }
      inc %acro
    }
    say %text
    halt
  }
}

dialog completion {
  title "Instinct Completion"
  size -1 -1 83 30
  option dbu
  edit %nc1, 1, 2 3 27 10, autohs
  edit "Nick", 2, 28 3 27 10, read center
  edit %nc2, 3, 54 3 27 10, return
  button "Apply", 4, 2 15 39 12, flat ok
  button "Cancel", 5, 41 15 39 12, flat cancel
  box "", 6, 1 -1 81 15
  box "", 7, 0 -2 83 32
  box "", 8, 1 11 81 18
}

alias nc { dialog -m completion completion }

on *:dialog:completion:sclick:4: {
  set %nc1 $did(1).text 
  set %nc2 $did(3).text
}

Comments

Sign in to comment.
NoFx   -  May 07, 2006

Simple, complete and very useful ! Nice work Jared :D

 Respond  
Jared   -  May 06, 2006

Xylem thanx for your comments :)

 Respond  
Xylem   -  May 06, 2006

DoOd, this script is great.

 Respond  
Jared   -  May 06, 2006

Thanx Pibb!

 Respond  
Pibb   -  May 05, 2006

i like this script alot. good job.

 Respond  
Sasuke   -  May 05, 2006

OH! I see..

 Respond  
Sasuke   -  May 05, 2006

Give me an example...

 Respond  
Jared   -  May 05, 2006

It\'s a nick completer Sasuke. Enhance a nick when you name it in the channel.

 Respond  
Sasuke   -  May 05, 2006

I don\'t get what it\'s supposed to do, but it\'s nice scripting, for sure.

 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.