|
|
@@ -564,6 +564,27 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item,
|
|
|
}
|
|
|
} else
|
|
|
chan->flood_exempt_mode = atoi(item[i]);
|
|
|
+ } else if (!strcmp(item[i], "closed-exempt")) {
|
|
|
+ i++;
|
|
|
+ if (i >= items) {
|
|
|
+ if (result)
|
|
|
+ strlcpy(result, "channel closed-exempt needs argument", RESULT_LEN);
|
|
|
+ return ERROR;
|
|
|
+ }
|
|
|
+ if (!str_isdigit(item[i])) {
|
|
|
+ if (!strcasecmp("Op", item[i]))
|
|
|
+ chan->closed_exempt_mode = CHAN_FLAG_OP;
|
|
|
+ else if (!strcasecmp("Voice", item[i]))
|
|
|
+ chan->closed_exempt_mode = CHAN_FLAG_VOICE;
|
|
|
+ else if (!strcasecmp("None", item[i]))
|
|
|
+ chan->closed_exempt_mode = 0;
|
|
|
+ else {
|
|
|
+ if (result)
|
|
|
+ strlcpy(result, "channel closed-exempt only accepts Op|Voice|None", RESULT_LEN);
|
|
|
+ return ERROR;
|
|
|
+ }
|
|
|
+ } else
|
|
|
+ chan->closed_exempt_mode = atoi(item[i]);
|
|
|
} else if (!strcmp(item[i], "flood-lock-time")) {
|
|
|
i++;
|
|
|
if (i >= items) {
|