Oh, so you're not even going to try . . . that's a good way to get a bad reputation.
The first plugin (" GHW Connect Messages") in the link that I provided should do what you asked for. Just set the connect and/or disconnect strings and then set the flags properly. Based on your request, either a 2 or 3 should be what you asked for for cm_flags.