I would have thought that this is a function of your firewall?
If you don’t automatically give Yahoo messenger internet access, it would have to ask for access.
Not sure if a program like ProcessGuard Pro could be customised in this way.