Gateway How intercept message for Bot

Hi List,

I am making a bot jabber via smack + openfire, since openfire supports external IM network thru Gateway plugin I want to know how I can make bot using gateway pluging , I mainly want to intercept each jabber message and process commands and send the out put to message sender (some what packet listner in smack api )

Since i dont want to manually code stuff (manualy integrate with all other IM)

is it possible using Gateway api ? can anybody anybody pl point me the right direction

Rgds,

P

Hi,

You should read the smack documentation. Essentially you want to create a process which connects to the openfire server via an XMPP connection. That connection should have an IM account (like msn) bound to it. When that connection recieves a message (either from another jabber contact or through the im gateway) it can be made to do whatever it is that you want it to do.

In particular I’d suggest you take a look at the PacketFilter object, you can then create a Listener which will pick up messages sent to your user from a particular user and then action a command.

This question is not really gateway plugin orientated. You’d do better getting more information from the smack manual’s and from the smack developer room.

You might also want to look at perl if you dont want to get involved with java - its a clean interface.

Mike