i’'m now work out a sample bot:
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.packet.*;
public class MyBot {
public static void main(String[] args) throws Exception {
XMPPConnection connection = new XMPPConnection(“192.168.0.2”);
PacketListener myListener = new PacketListener() {
public void processPacket(Packet packet) {
//do something here…
System.out.println(packet.toXML());
}
};
connection.addPacketListener(myListener, null);
connection.login(“admin”, “111111”);
while(true){
System.in.read();
}
}
}
/code
and if write a class to read/write mysql it can be complete by have a chat conversion with user.
but i fell it’‘s kind of stupid. first, it needs a account and sign in as a user. second, wildfire must have it’'s own mysql class, then why to write another? last, it needs start another process with “java MyBot” command line.
i’'ve read this article:
url=http://www.jivesoftware.org/builds/wildfire/docs/latest/documentation/plugin -dev-guide.html
http://www.jivesoftware.org/builds/wildfire/docs/latest/documentation/plugin-dev -guide.html
/url
but i havn’‘t found how to make a plugin. first of all, i even don’‘t know import which package? where’'s the package jar file for org.jivesoftware.wildfire.container.* ? smack only has org.jivesoftware.smack.* .i wonder if some one can give me a sample about how to write a plugin.
Thanks indead! and Meery Xmas _