Add-on Exchange-like Distribution Groups

Foxtrek_64

Member
Hopefully this is fairly simple - not looking for a pre-built plugin so much as pointers on where and how to start, though if a plugin already exists for this, no need to "re-invent the wheel."

Basic outline of this addon is as follows:
My xenForo forum has different user group, such as Admin, Moderator, LoreMaster, etc.

As it stands today, if I wanted to message everyone on my admin team, I would have to add all of them manually.

I'm looking for a way to emulate distribution groups found in Microsoft Exchange - in the Exchange environment, distribution groups are emails that do not have a mailbox attached to them, but rather it functions as a pointer to a group of mailboxes.

For instance, if I were to email everyone@example.com, Exchange would see incoming mail heading to that address and automatically re-route a copy to each member of that group, in this case everyone on the mail server.

The end goal of the plugin is to have the capability to message a user group, likely identified with a special character (e.g. !admins, where "admins" is the name of the usergroup as defined in xenForo and/or an alias defined by the plugin). Additionally, I would like to, per user group, add permissions on who people can message. I don't want a member of my default user group sending a private message to everyone on my server, but for a server-wide announcement, I might want members of my admin team (user group) to have that capability.

The psuedo-code for this is relatively simple (you should be able to see my C# background):
Message to: !admins
Code:
if (message.sender.hasPermission(message.sendTo(admins))
{
    for each (member user in admins)
    {
        message.recipient.add(user);
    }
    message.recipient.remove("!admin");
    message.send();
}
else
{
    throw new AccessDeniedException();
}


Ultimately, my question is simple: What language will I need to write this plugin in and what APIs should I use to access the messaging component of xenForo?
 
Top Bottom