Bot active depending on status?

I’m relatively new to Openfire - I have an idea, I think it’s possible, but I’d like some pointers on how to go about it. The behavior I’m trying to achieve is something like the following:

  1. marks self with a specific state/states (Away: so and so)

  2. sends a message to

  3. user2 receives reply: “user is unavailable. Please press one to send further messages to his/her mobile. Please press two to send further messages to his/her email box.”

  4. user2 indicates which he/she prefers, and messages are relayed via SMTP (or what have you) to the intended destination

I would really prefer to implement this on the server side (in this case, on the jabber server running on - what mechanism would be ideal? Some sort of filter that activates on status? A plugin? A component? A bot? I realize this would make more sense on a client, but I use many, many clients, and modifying/scripting most of them isn’t an option.

i think that you should write a plugin which is implementing a packet interceptor … that sould do for your needs.