The nn part is the only part that really needs the $istok. The rest should be fine with the isin example. Just checking for night is enough for "goodnight", "good night", and "night".
To put the 2 together:
if ($istok($1-,nn,32 ) || $istok($1-,nn!,32) || $istok($1-,nn.,32) || night isin $1-) { do this }
As I said, someone could still just mention night in what they are saying. There is no real way to prevent that from triggering the script if you are going to allow it to be anywhere in the line.
Example:
This night is very cold.
There isn't a good way for the script to know that it shouldn't trigger for that unless you limit where it accepts the word night/goodnight/good night. It's usually best to have it just accept it if that's the only thing on the line.
Also, be warned that some people love to flood bots that respond to commands. Once someone knows your bot responds to that trigger, they can just keep typing it until your bot is flooded off the server. Protections for that would be wise.