mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 02:46:21 +00:00
Added /room ban command
This commit is contained in:
@@ -2128,6 +2128,7 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
(g_strcmp0(args[0], "config") != 0) &&
|
||||
(g_strcmp0(args[0], "subject") != 0) &&
|
||||
(g_strcmp0(args[0], "kick") != 0) &&
|
||||
(g_strcmp0(args[0], "ban") != 0) &&
|
||||
(g_strcmp0(args[0], "role") != 0) &&
|
||||
(g_strcmp0(args[0], "affiliation") != 0) &&
|
||||
(g_strcmp0(args[0], "info") != 0)) {
|
||||
@@ -2195,6 +2196,17 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "ban") == 0) {
|
||||
char *jid = args[1];
|
||||
if (jid) {
|
||||
char *reason = args[2];
|
||||
iq_room_affiliation_set(room, jid, "outcast", reason);
|
||||
} else {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "affiliation") == 0) {
|
||||
char *cmd = args[1];
|
||||
if (cmd == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user