:*!codeword*:

by having the asterisks like this, it responds to test!codeword and to !codewordy and when !codeword is not followed by anything. You can make it respond only if it begins with codeword and has at least 3 words like:

Code:
on *:TEXT:!codeword & *:#: {msg $chan  $nick says hello %nick1  $+
}


You can change :#: to :#channelname: to prevent it from responding in other channels.

If the channel message is:

!codeword @targetnick message

then the 1st word is $1 and the 2nd word is $2, so you would use $2 instead of $nick