+2004-09-12 Michael Poole <mdpoole@troilus.org>
+
+ * include/channel.c (mode_parse_upass, mode_parse_apass): Only let
+ services (not normal opers) force a change of +A or +u.
+
2004-09-11 Michael Poole <mdpoole@troilus.org>
* include/s_stats.h: Add sd_name to struct StatDesc. Stop
return;
}
+ /* If a non-service user is trying to force it, refuse. */
+ if (state->flags & MODE_PARSE_FORCE && !IsChannelService(state->sptr)) {
+ send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
+ "Use /JOIN", state->chptr->chname, " <AdminPass>.");
+ return;
+ }
+
/* If they are not the channel manager, they are not allowed to change it */
if (MyUser(state->sptr) && !IsChannelManager(state->member)) {
if (*state->chptr->mode.apass) {
return;
}
+ /* If a non-service user is trying to force it, refuse. */
+ if (state->flags & MODE_PARSE_FORCE && !IsChannelService(state->sptr)) {
+ send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
+ "Use /JOIN", state->chptr->chname, " <AdminPass>.");
+ return;
+ }
+
/* Don't allow to change the Apass if the channel is older than 48 hours. */
if (TStime() - state->chptr->creationtime >= 172800 && !IsAnOper(state->sptr)) {
send_reply(state->sptr, ERR_CHANSECURED, state->chptr->chname);