Afaict it is not possible on a protocol level to block individual users in a MUC room.
First of all MUC users in anonymous rooms do not possess a “real” jid like “user@server.domain”, but do have a MUC JID instead (“room@conference.server.domain/nickname”). This JID is usually not fixed, eg. it changes when the user changes their nickname, so it doesn’t make sense to block based on that JID.
So I fear that blocking single users in MUC rooms is not possible after all.
Edit: Apparently it is possible to block users based on their MUC JID (muc@conference.server.domain/nickname), but as I wrote earlier this can easily be circumvented by changing the nick.
I understand your concerned but there must be a way to block user from particular chatroom if nickname cannot be changed.
like if block someone in bla-bla@s.chatp.net/dude then he cant message me anymore in that chatroom.
But, if i meet him in another room netherland@s.chatp.net/dude then he unblock there is acceptable.
can we do that?
You may try the “Banning a User” Admin Use case of XEP-0045. For that you must be an admin or owner. In order to ban a user, an admin MUST change the user’s affiliation to “outcast”.
I’ve tried it with Psi and a test room, which I configured manually in the Openfire admin console – by adding the user’s JID to the “Outcast” list.