This mod allows your users to setup their own personal private message block lists. No one on their lists will be allowed to PM them. (You can optionally specify immune usergroups such as admins and mods that can't be blocked.)

You can also optionally enable 2-way blocking so if one user adds someone to their block list they can not PM that user either. (Recommended)

This mod requires you to create 1 multi-line user profile field via your Admin CP. Detailed instructions for doing so are included in the installation instructions in the .zip.

LIMITATIONS OF THIS MOD:

If a user changes usernames the block list will need to be updated with the new username.

Notes:

When adding a username to the block list capitalization of the letters do not count but all other punctuation such as spaces DO count.

This mod adds 2 phrases in Error Messages:

pm_blocked - This is the error shown when a user has been put on the recipients block list.

pm_denied - This is the error shown when 2-way blocking is enabled and a user tries to PM a recipient on their own block list.

Would you be able to make the change or a version that allows only certain usergroups the ability to use it?

I'm assuming you mean you'd want some usergroups to not be able to block anyone? That would be possible but as I said earlier they would still see the profile field so it would be confusing. You would have to explain that some people without permission to use the mod and their "block lists" would be ignored.