I'm pretty new to mIRC and coding in general. I want the bot to greet a person when they say "hi" (not when they join the channel). Here's a snippet of the script:

on *:text:*hi*:#:{
else { msg # Hello, $nick ! }
}

First of all, how can I add punctuation onto $nick? If I do something like "Hello, $nick !", it kinda bothers me that there's a space between the username and the exclamation point. Is it possible to conjugate the two?
Second, is it possible for the bot to not trigger when the message includes someone else's name? For example, with this, I could say "Hi Bob" but it would still reply "Hello, cooliosis !" Sorry for the really stupid questions.