I have attached small patch which fixes one bug and adds a fullJID (which includes resource) check support.
Bug fix detail:
There is a copy-paste error in code where code for checking destJID wrongly checks soureJID. (which was most likely copy-paste from sourceJID code)
The patch fixes it.
A small 4 line code adds support for checking fullJID including resource. (checks for presence of "/" in rule JID)
This allows blocking/allowing message by resource or by MUC private messages by nickname.
for e.g if I wanted to block MUC private message to users of room except moderator. then using this feature I can do this as follows:
Lets say roomname is research
Room service name is conference.yoyodyne.com
moderator id/nick is admin
Domain name is yoyodyne.com
1st rule would be to PASS any message from JID "*@conference.yoyodyne.com" to any
so that room itself can send message of any type to anyone
2nd rule would be to PASS any message from user "email@example.com" to any
so that moderator can reply back (or do anything)
3rd rule would be to PASS any message from "any" to user "firstname.lastname@example.org"
so that anyone is allowed to send msg to admin by his real JID
4th rule would be to PASS MUC private messages from "any" to JID email@example.com/admin
so that anyone is allowed to send pvt msg to room moderator by his room based JID
(This rule uses this new feature/patch)
5th rule would be to DROP MUC private message from "any" to "any"
This allows anyone to send private msg to admin/moderator but not to other users.
Hope it helps