powered by Jive Software

Passworded MultiUserChat (again, apparently)

Hi.

So in this thread, someone asked how to make a MultiUserChat with a password, and was given an answer which reportedly worked.

I’m also trying to create a MultiUserChat with a password, but I seem to be having no luck. My impression is that a passworded MultiUserChat should reject somebody who tries to join without a password, right? And that’s what happens when I create a room and set it to be password required through pidgin. But when I run this code, and then connect to the room without a password, I can get right in.

I attached a test case, which is mostly cut and pasted directly from the above-linked discussion. Is there some sort of error in it? Are my expectations wrong? Or does this just work for everyone but me?

Thanks.

-allen
TestMUC.java (2435 Bytes)

Hi,

As I said in the original thread, the code I posted was untested. I have set other properties on rooms such as whether the room is public/private or whether the room is persistent that worked fine. So I figured that the password feature was similar, but I have not implemented it in my client. Perhaps the original poster did not try the case of logging in without a password and therefore it seemed to work for them. I don’t have any other suggestions of what could be the problem though.

Chris

Huh. Ok. I’ll try setting some of the other values and see if they’re coming through.

I’m also seeing slightly different behavior when communication with varios public servers (plus a few local servers that I’ve installed for testing), so it could be a case of being almost but not quite on spec.

Interesting that it is different amongst servers, it is certainly possible things are not quite on spec. I have tested my client only with Openfire for a server, but with Exodus and Spark for other clients regularly. One thing I did notice is that in the room config docs I linked to, they list the ‘roomsecret’ data type as ‘text-private’, but all the other ones I was working with were just ‘boolean’ or ‘text-single’. I did a search in that doc and didn’t see any other reference to ‘text-private’, so I don’t know what that really means in terms of implementation. I did work with a ‘jid-multi’ before actually and you had to wrap the answer in an array list for example. Perhaps if that parameter is not what the server was expecting then it is effectively treating it like a regular room or something.

Chris