tags:

views:

179

answers:

3

Basically im trying to build a bot that can send a message using one of many accounts out to a user and be able to receive messages to that account it originally used process and do whatever I need it to do. So far I found the JAXL library (http://code.google.com/p/jaxl/) but based on examples it is only able to handle one user at a time. Any suggestions or ideas?

thank you in advanced.

btw if there is anyway to make the server automatically forward those messages to another program or whatever that works just as well.

A: 

I think what you're asking is: "Can I send a copy of all the 'outgoing' messages on a server to an XMPP client?" The answer to that question is "sort of."

You're looking at two pieces, server configuration and client/component configuration. You probably don't want a client. because it needs to log in as a particular user. You're describing a component, which is a trusted application running on the XMPP server or nearby, and acts as part of the server.

The server configuration part depends on which server you're using. I know XCP can do this kind of thing, such as with a message archive component. With ma you'd make a component to write the messages to a log or database. You'd be making a similar component that grepped strings for street addresses and sent out flowers, or something -- whatever action you needed to happen.

The big assumption I'm making is that you are in complete control of the server here. If you don't then the answer is "no."

A. R. Diederich
A: 

I recently used the smack library to host dozens of 'Xmpp bots'. There was no such limitation that you could only connect as a single user. Just spawned a thread for each bot, made him connect as an individual xmpp user on a server (and even on different servers) and do its job. In my case the bots simply sent test messages to test chat rooms, but a proxy service (as I understood it from your question) is possible as well.

The threads were even designed to create the user and delete it after stopping.

Andreas_D
A: 

I think you are looking for a external component.... Jaxl v 2.0 does allow you having component bots written in PHP http://github.com/abhinavsingh/JAXL

Abhinav Singh