[JDEV] extending chatbot
Duncan Hoyle
duncanh at granada-learning.com
Thu Jun 27 12:40:11 CDT 2002
Hi
I've been doing some work to extend the chatbot to our needs
and have a query -
some of the things we need to do require that the bot be
able to browse the server (for rooms, users etc) and there's
a BrowseRequest routine which should do the job. As a test I
tacked a routine onto the bottom of the chatbot which did a
BrowseRequest and I found that the routine never returned a
result. The server got the browse, returned the correct
response and the xml::stream for the bot read the response.
The same this happens when I try doing a VersionQuery.
As a further test I created a new module which did all the
work but instead of using the existing connection I created
a new using the same serverid, passwd etc as the original.
The only difference is that I didn't register any callbacks.
BrowseRequest and VersionQuery both work. If I register
callbacks they no longer do.
I put debug messages in the callbacks but they are never
reached. See below for relevant debug from './chatbot
--debug 1'
Is there anyway I can use the original connection to do my
BrowseRequest as our bot is likely to be in regular use, and
therefore making many unwanted connections.
Thanks
Duncan
XML::Stream: Send: (<iq id='3' to='winjabber.ilp.com'
type='get'><query xmlns='jabber:iq:browse'/></
iq>)
XML::Stream: IgnoreActivity: ignoreActivity(0)
NJ::Client: SendAndReceiveWithID: sent with id(3)
NJ::Client: WaitForID: id(3)
NJ::Client: ReceivedID: id(3)
NJ::Client: ReceivedID: nope...
NJ::Client: WaitForID: haven't gotten it yet... let's wait
for more packets
NJ::Client: Process: timeout(1)
XML::Stream: Read: buff(<iq id='3'
to='chatbot at winjabber.ilp.com/chatbotresource' type='result'
from
='winjabber.ilp.com'><service xmlns='jabber:iq:browse'
type='jabber' jid='winjabber.ilp.com' name='J
abber Server'>
<service type='jud' jid='jud.winjabber.ilp.com'
name='Jabber User Directory'>
<ns>jabber:iq:search</ns>
<ns>jabber:iq:register</ns>
</service>
<conference type='public'
jid='conference.winjabber.ilp.com' name='Public Chatrooms'/>
<conference type='private'
jid='private.winjabber.ilp.com' name='Private Chatrooms'/>
<item jid='winjabber.ilp.com/admin' name='Online
Users'/><ns>jabber:iq:admin</ns></service></i
q>)
NJ::Client: ReceivedID: id(3)
NJ::Client: ReceivedID: nope...
NJ::Client: WaitForID: haven't gotten it yet... let's wait
for more packets
NJ::Client: Process: timeout(1)
NJ::Client: ReceivedID: id(3)
NJ::Client: ReceivedID: nope...
More information about the JDev
mailing list