Most networks will display the away message that you set using /away <message> when someone sends you a pm/query message.
If this isn't what you were referring to, please be more detailed regarding your wants, as I suspect that this might require scripting capabilities.