Actually, all you have to do is close the remotes. This code does not in any warrant the restarting of the program.
I can't test it here, so this could be wrong, but the on INPUT event usually requires you to use halt, and not haltdef.
On a side note - thise code also doesn't do what TAB does. TAB actually completes the nick, this code requires you to type out the complete nick.
on *:INPUT:#: {
[color:green]; if you typed out a complete nick[/color]
if ($1 ison $chan) && ($2) msg $chan $+ : $2-
[color:green]; if only one nick matches the letters you typed[/color]
elseif ($ialchan($+($1,*!*@*),$chan,0) == 1) msg $chan $ialchan($+($1,*!*@*),$chan,1) $+ : $2-
[color:green]; if no nicks match the letters you typed[/color]
elseif ($ialchan($+($1,*!*@*),$chan,0) == 0) echo -a ERROR: no matches found
[color:green]; if more than 1 nicks match the letters you typed[/color]
else echo -a ERROR: more than one match found
halt
}
This code actually completes the nick.
Not to be a meany, but I do wonder about your use of () in the if statement. Why do you not use them on the first condition, but you do use them on the second?