restrict setting topic to mod
This commit is contained in:
parent
7eb46d467f
commit
8886035ebe
5
cmd.c
5
cmd.c
@ -233,6 +233,11 @@ icb_cmd_topic(struct icb_session *is, char *arg)
|
||||
else
|
||||
icb_status(is, STATUS_TOPIC, "The topic is not set.");
|
||||
} else { /* setting the topic */
|
||||
if (!icb_ismoder(ig, is)) {
|
||||
icb_status(is, STATUS_NOTIFY, "Setting the topic is "
|
||||
"only for moderators.");
|
||||
return;
|
||||
}
|
||||
strlcpy(ig->topic, arg, sizeof ig->topic);
|
||||
icb_status_group(ig, NULL, STATUS_TOPIC,
|
||||
"%s changed the topic to \"%s\"", is->nick, ig->topic);
|
||||
|
Loading…
x
Reference in New Issue
Block a user