How do the XMPP modules work in perl?

Posted by TheGNUGuy on Stack Overflow See other posts from Stack Overflow or by TheGNUGuy
Published on 2010-03-29T03:04:16Z Indexed on 2010/03/29 4:03 UTC
Read the original article Hit count: 401

Filed under:
|
|
|
|

Hey everybody,

I am trying to make my own jabber bot but i have run into a little trouble. I have gotten my bot to respond to messages, however, if I try to change the bot's presence then it seems as though all of the messages you send to the bot get delayed. What I mean is when I run the script I change the presence so I can see that it is online. Then When I send it a message it takes 3 before the callback subroutine i have set up for messages gets called. After the 3rd message is sent and the chat subroutine is called it still process the first message I sent. This really doesn't pose TOO much of a problem except that I have it set up to log out when I send the message "logout" and it has to be followed by two more messages in order to log out. I am not sure what it is that I have to do to fix this but i think it has something to do with iq packets because I have an iq callback set as well and it gets called 2 times after setting the presence.

Here is my source code: http://pastebin.com/MgKMhTML

Thanks for your help!

© Stack Overflow or respective owner

Related posts about perl

Related posts about xmpp