have a look at the F1 help or
https://en.wikichip.org/wiki/mirc/on_events/on_inputin this event, you want to check
if ($1- == ciao) {
code goes here
}
What you type would have gone into the channel anyways, so if you're wanting to change your message, such as adding color, you'll need to include a HALT to prevent the normal message from going out in addition to what your script does
That being said, this word is over-used by karaoke bots, and can earn someone a ban from some channels if they stay this word shortly after entering the channel.
Also, if your idea is to automatically reply a greeting to someone else saying a greeting, you must be careful about that, or this can go into an infinite loop if 2 people have the same reply-to-same-greeting script, lol