metajack/strophejs-plugins — pull request #61 by Gordin (2012-02-01 03:52:47+00:00)
Title: class for room and config, more functions

I made a mess with my git history, so here are all my changes for the MUC-plugin up until now...

I added:

A class XmppRoom that stores some data specific to a room and can call convenience functions.
A class that stores information about a room (basically what gets returned by a disco-query to a room)
A function queryOccupants that queries a room for a list of occupants

I replaced the modifyUser function by a modifyRole and modifyAffiliation function. modifyUser was broken because it took a nickname, role and affiliation, but all queries that change roles or affiliations ONLY take either a nick and a role or a jid and an affiliation.

I added shortcut function for most authoritative tasks for easy access. (kick, ban, etc.)

The XmppRooms also have shortcuts for all new functions.