[ADD] Add XMPP commands for managing whitelists

This commit is contained in:
LDA 2024-09-29 09:37:46 +02:00
commit 09d38993bb
2 changed files with 152 additions and 0 deletions

View file

@ -28,5 +28,15 @@
XMPPSetFormTitle(cmd, "No-fly addition form"); \
XMPPSetFormInstruction(cmd, "Select a glob pattern to add to the nofly"); \
}) \
XMPP_COMMAND(ClearWhitelistCallback, "clear-wl", "Removes the chat whitelist", {}) \
XMPP_COMMAND(AddWhitelistCallback, "add-wl", "Adds server to chat whitelist", { \
XMPPOption *serv = XMPPCreateText(true, "entity", ""); \
XMPPSetDescription(serv, "Server to mark as admin"); \
XMPPAddOption(cmd, serv); \
\
XMPPSetFormTitle(cmd, "Chatlist addition form"); \
XMPPSetFormInstruction(cmd, "Add a server to whitelist"); \
}) \
XMPP_COMMAND(WhitelistCallback, "wl", "Get Parsee's chat whitelist", {}) \
XMPPCOMMANDS