powered by Jive Software

Moderated room - grant voice automatically

We’re trying to implement a feature in our multi user chat whereby a host temporarily silences a user. Ideally we’d do this the XMPP way, i.e revoking their voice in the room. This means we’ll need to make sure rooms are moderated. The problem with this as that the way our chat works, users need to automatically be given voice in a room. They may join a room without someone hosting and still be able to chat, which is why unmoderated rooms has worked well so far.

I started writing a plugin that implements SessionEventListener which was going to listen for user’s login and loop the room list and grant them voice. Reading the APIs this voice grant needs to come from a user, hence it can’t really be done within the plugin without it being a nasty hack. Presumably we’d also come across the same problem if we implemented a removal of voice for a specific time limit feature, with some sort of scheduler re-granting voice after the time limit has expired.

Has anyone else come across something like this, and if so how did you implement your solution?



Right, I’ve thought of something - as we need an across all rooms mute I’ve instead created a group for banned users, and stick all troublemakers in this group. I can then use the ‘Packet Filter’ plugin to reject any messages from this group. I’ll probably write a packet interceptor to catch any rejection messages and resent the message with something more helpful (e.g. you’ve been banned, call customer support at xyz…).

Would still be keen to hear any other ideas people have : )