Blocking communication between 2 users

Is there any easy way to prevent 2 users, or groups of users, on the same server from messaging each other?

If there isn’'t an easy way to do this could somebody confim if the following idea would work:

I have my Helpdesk group that (thanks to the fine folks here) all users can see and I would like all users to be able to message. I also have 5 users that i do not want to be able to message each other, but would like them to be able to message the members of the helpdesk group. The only thing I seem to be able to come up with is to set up 6 servers, 1 for helpdesk and 1 for each of the 5 users, black list the users servers on each of the other user servers. This seems like a realy cumbersome and backwards way of aproching this problem to me, but it’'s all I could come up with.

Thanks for any sugestions.


i think a XMPP Server is to enable Communication not to disable

Maybe it is only possible that the Users block each other, but not the admin. You can also figure out a great Group Settings that they get not automatical into their Rosters, but they can add each other by knowing here JIDs.

The situation that this setup is going to be used for is administering tests. I would like the person taking the test to be able to ask questions of the test administrators, but not be able to share answers with there fellow test takers.

I think using the group policys is going to be the route I take. Do any of you fine fellows here know of a jabber client that would allow me to disable users from manualy adding contacts? I agree preventing comunication isn’‘t what XMPP was designed for. It’‘s not so much comunication I want to stop, as much as I’'d like to prevent cheating on tests.

Hi Halpo,

As an experiment awhile back I wrote a plugin that would block all conversations between two (hard coded) shared groups. I did it mostly as a proof-of-concept for JM-349 so I didn’‘t get into of the details such as adding a UI or what to do about presence, i.e. if Sally is in accounting and Bob is in sales, should Sally be able to see if Bob is online even if she can’‘t message him? Anyway, what you’‘re looking for is certainly possible, but it isn’'t something Wildfire supports out-of-the-box.



I think you’‘ve definatly pointed me in the right direction, From what I’‘ve been reading it seem the file that needs to be edited is the I’‘m having no end of trouble trying to find this file on the windows install that I have compleated. I’'m figuring this all out as I go along so I apologize for any increadibly obvious mistakes in my reasoning. Am I going to need to download the source, or the linux source (if it needs to be run on linux to gain access to this that not an issue as I have several diffrent servers at my disposal) to accomplish this?

If my ramblings arn’'t making any sence I got the info from

Message was edited by: Halpo

Hi Halpo,

While it’‘s useful to have the Wildfire source for development purposes you really don’‘t want to be modifying it since you’‘d have to merge your changes into future versions of Wildfire which could result in unexpected side effects and become a bit of a maintence issue. A better approach would be to develop a plugin that uses a PacketInterceptor. I wasn’'t able to find the code I had written before but the (untested) snippet below should help you get started:

private class GroupPacketInterceptor implements PacketInterceptor {
   public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed) throws PacketRejectedException {
                try {
         if ((packet instanceof Message) && incoming && !processed) {
            Message msgPacket = (Message) packet;             JID toJID = msgPacket.getTo();
            JID fromJID = msgPacket.getFrom();
                              GroupManager groupManager = GroupManager.getInstance();
                              Collection<Group> toGroups = groupManager.getGroups(toJID);
            Collection<Group> fromGroups = groupManager.getGroups(fromJID);
                              for (Group toGroup : toGroups) {
               if (fromGroups.contains(toGroup)) {
                              throw new PacketRejectedException();
      catch (NullPointerException npe) {

Hope that helps,


Message was edited by: ryang - fixed formatting

Hi Matt,

please visit or ce-build.html and use the current version if you download the JDK and Wildfire.

Try to clone the “Content Filter Plugin” - this should be the one which matches your requirements most. It’'s not a good idea to modify

And please visit also x.html and read the “Plugin Developer Guide”, or take at least a note that it exists.