Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2004-09-12 12:57:43 UTC
Modified files:
ChangeLog ircd/channel.c
Log message:
Only let services (not normal opers) force a change of +A or +u.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.465 ircu2.10/ChangeLog:1.466
--- ircu2.10/ChangeLog:1.465 Sat Sep 11 20:53:43 2004
+++ ircu2.10/ChangeLog Sun Sep 12 05:57:32 2004
@@ -1,3 +1,8 @@
+2004-09-12 Michael Poole <[EMAIL PROTECTED]>
+
+ * 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 <[EMAIL PROTECTED]>
* include/s_stats.h: Add sd_name to struct StatDesc. Stop
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.97 ircu2.10/ircd/channel.c:1.98
--- ircu2.10/ircd/channel.c:1.97 Sat Sep 11 08:51:41 2004
+++ ircu2.10/ircd/channel.c Sun Sep 12 05:57:32 2004
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: channel.c,v 1.97 2004/09/11 15:51:41 entrope Exp $
+ * $Id: channel.c,v 1.98 2004/09/12 12:57:32 entrope Exp $
*/
#include "config.h"
@@ -2340,6 +2340,13 @@
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) {
@@ -2440,6 +2447,13 @@
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);
----------------------- End of diff -----------------------