powered by Jive Software

In openfire how to create bot

In openfire How to create a bot which will be logging in as a bot user and automatically joins to the chatroom to which it is a participant after login, and if a new chatroom is created in which bot user is a participant then automatically the bot user has to join the newly created chatroom and get all the messages.

I have seen botz library Botz: Internal Bot Library for Openfire but according to the comment section it is updated long back. So, is there any bot library using which I can achieve the above use cases.

Something like that doesn’t really exist in Openfire. You could follow the route that Botz did, by implementing a packet listener - but that wouldn’t actually be a ‘user’ - it would simply be able to intercept all stanzas, and operate on them if so desired.

Another solution would be to create a regular, external client, using a library like Smack (or one of the many third party libraries), and implement the desired functionality that way.

The first option is probably a lot less complex, but needs to be implemented as an Openfire plugin. The latter can be run as a stand-alone process (which may or may not be an advantage), but will probably be more complex to do.

does botz recieve only data related to the jid logged in or it’ll get all messages?

I don’t know. Up until yesterday, I had never heard of Botz.