An until recently unused moderatoration measure against annoying lobby clients is to mute them, which can be accomplished by setting their role to 'visitor'.
In accordance with the specs https://xmpp.org/extensions/xep-0045.html, clients that have the visitor role can't post chat messages anymore.
The role is lost when logging out and in again, so it is only a temporary measure.
This patch prints a chat message if a user was muted or unmuted or if a client became a moderator or lost the moderation access.
It also hides the chat input, so that clients don't get an error message when failing to send chat, but don't even have that text form anymore.
scythetwirler also has an XPartaMupp patch in the making that persists that role by letting the bot remember the role locally and automatically
setting it back to visitor upon login.
Therefore the patch doesn't print those muted messages to other users if a muted user logs in.
A gloox patch could be implemented to make those 2 C++ lines a tid nicer (we can observe affiliation changes with gloox but not role changes), if someone wants to.
(screenshot doesn't show the input hiding)