[JDEV] net::jabber BrowseRequest problem

Duncan Hoyle duncanh at granada-learning.com
Mon Jun 24 08:17:00 CDT 2002


Hi

I'm new to net::jabber and perl so hopefully I'm not doing
something stupid.....

I'm trying to extend the perl chatbot so it can tell a user
everyone who's currently logged in to my server. 
If I use the following code $result does not get anything
returned to it ($Client is the client created inside
ChatBot).

	my $users;
	my %results  =
$Client->BrowseRequest(jid=>"help\@myserver.com",
timeout=>10);
	for my $child ( @{ $results{'children'} })
	{
		$users= "$users$child->{'jid'}\n" ;
	}
	$Debug->Log0("users=".$users); 

The request gets passed back to the server and the server
debug shows the result I would expect, but nothing is passed
back to the bot.


I managed to get round this by creating a new module which
creates a new temporary Client and connects it using the
same name and server details as the chatbot (except for the
resource). This time the result is returned correctly and
the temp client disconnects.

The problem seems to be that in Protocol.pm ReceivedID()
(line 1322) never returns true for the first example.

I'd prefer to use the first example if I can as it saves
unwanted temporary connections to the server.

Does anyone have any idea why the first eg doesn't work?

Duncan



More information about the JDev mailing list