CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2003-06-22 13:22:48 UTC
Modified files:
ChangeLog doc/example.conf include/ircd_features.h ircd/channel.c
ircd/ircd_features.c ircd/m_kick.c
Log message:
Author: beware
Log message: Added OPLEVELS feature, which makes it possible to disable the
+Au/oplevels stuff.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.380 ircu2.10/ChangeLog:1.381
--- ircu2.10/ChangeLog:1.380 Tue Jun 17 13:11:59 2003
+++ ircu2.10/ChangeLog Sun Jun 22 06:22:37 2003
@@ -1,3 +1,9 @@
+2003-06-22 Bas Steendijk <[EMAIL PROTECTED]>
+
+ * include/ircd_features.h, ircd/channel.c, ircd/ircd_features.c,
+ ircd/m_kick.c, doc/example.conf: Added OPLEVELS feature, which
+ makes it possible to disable the +Au/oplevels functions.
+
2003-06-17 Alex Badea <[EMAIL PROTECTED]>
* ircd/res_adns.c: included sys/types.h, for non-Linux
Index: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.20 ircu2.10/doc/example.conf:1.21
--- ircu2.10/doc/example.conf:1.20 Wed Apr 3 07:23:47 2002
+++ ircu2.10/doc/example.conf Sun Jun 22 06:22:37 2003
@@ -761,6 +761,7 @@
# "LOCOP_SEE_IN_SECRET_CHANNELS" = "FALSE";
# "LOCOP_WIDE_GLINE" = "FALSE";
# "LOCOP_LIST_CHAN" = "FALSE";
+# "OPLEVELS" = "TRUE";
};
# Well, you have now reached the end of this sample configuration
Index: ircu2.10/include/ircd_features.h
diff -u ircu2.10/include/ircd_features.h:1.16 ircu2.10/include/ircd_features.h:1.17
--- ircu2.10/include/ircd_features.h:1.16 Tue Jan 7 02:06:44 2003
+++ ircu2.10/include/ircd_features.h Sun Jun 22 06:22:38 2003
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ircd_features.h,v 1.16 2003/01/07 10:06:44 a1kmm Exp $
+ * $Id: ircd_features.h,v 1.17 2003/06/22 13:22:38 denspike Exp $
*/
struct Client;
@@ -49,6 +49,7 @@
FEAT_HIDDEN_IP,
FEAT_AUTOHIDE,
FEAT_CONNEXIT_NOTICES,
+ FEAT_OPLEVELS,
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.83 ircu2.10/ircd/channel.c:1.84
--- ircu2.10/ircd/channel.c:1.83 Sat Jan 11 04:49:25 2003
+++ ircu2.10/ircd/channel.c Sun Jun 22 06:22:38 2003
@@ -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.83 2003/01/11 12:49:25 bleepster Exp $
+ * $Id: channel.c,v 1.84 2003/06/22 13:22:38 denspike Exp $
*/
#include "config.h"
@@ -218,10 +218,13 @@
* who then will educate them on the use of Apass/upass.
*/
+ if (feature_bool(FEAT_OPLEVELS)) {
if (TStime() - chptr->creationtime < 172800) /* Channel younger than 48 hours? */
schedule_destruct_event_1m(chptr); /* Get rid of it in approximately 4-5
minutes */
else
schedule_destruct_event_48h(chptr); /* Get rid of it in
approximately 48 hours */
+ } else
+ destruct_channel(chptr);
return 0;
}
@@ -2796,6 +2799,7 @@
continue;
}
+ if (feature_bool(FEAT_OPLEVELS)) {
/* don't allow to deop members with an op level that is <= our own level */
if (state->sptr != state->cli_change[i].client /* but allow to deop
oneself */
&& state->member
@@ -2810,6 +2814,7 @@
}
}
}
+ }
/* set op-level of member being opped */
if ((state->cli_change[i].flag & (MODE_ADD | MODE_CHANOP)) ==
@@ -2974,10 +2979,12 @@
break;
case 'A': /* deal with Admin passes */
+ if (feature_bool(FEAT_OPLEVELS))
mode_parse_apass(&state, flag_p);
break;
case 'u': /* deal with user passes */
+ if (feature_bool(FEAT_OPLEVELS))
mode_parse_upass(&state, flag_p);
break;
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.22 ircu2.10/ircd/ircd_features.c:1.23
--- ircu2.10/ircd/ircd_features.c:1.22 Sat Jan 11 03:24:22 2003
+++ ircu2.10/ircd/ircd_features.c Sun Jun 22 06:22:38 2003
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ircd_features.c,v 1.22 2003/01/11 11:24:22 bleepster Exp $
+ * $Id: ircd_features.c,v 1.23 2003/06/22 13:22:38 denspike Exp $
*/
#include "config.h"
@@ -255,6 +255,7 @@
F_S(HIDDEN_IP, 0, "127.0.0.1", 0),
F_B(AUTOHIDE, 0, 1, 0),
F_B(CONNEXIT_NOTICES, 0, 0, 0),
+ F_B(OPLEVELS, 0, 1, 0),
/* features that probably should not be touched */
F_I(KILLCHASETIMELIMIT, 0, 30, 0),
Index: ircu2.10/ircd/m_kick.c
diff -u ircu2.10/ircd/m_kick.c:1.10 ircu2.10/ircd/m_kick.c:1.11
--- ircu2.10/ircd/m_kick.c:1.10 Tue Jan 7 19:17:19 2003
+++ ircu2.10/ircd/m_kick.c Sun Jun 22 06:22:38 2003
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_kick.c,v 1.10 2003/01/08 03:17:19 klmitch Exp $
+ * $Id: m_kick.c,v 1.11 2003/06/22 13:22:38 denspike Exp $
*/
/*
@@ -91,6 +91,7 @@
#include "numeric.h"
#include "numnicks.h"
#include "send.h"
+#include "ircd_features.h"
#include <assert.h>
@@ -141,7 +142,7 @@
return send_reply(sptr, ERR_USERNOTINCHANNEL, cli_name(who), chptr->chname);
/* Don't allow to kick member with a higher or equal op-level */
- if (OpLevel(member) <= OpLevel(member2))
+ if ((OpLevel(member) <= OpLevel(member2)) && feature_bool(FEAT_OPLEVELS))
return send_reply(sptr, ERR_NOTLOWEROPLEVEL, cli_name(who), chptr->chname,
OpLevel(member2), OpLevel(member), "kick",
OpLevel(member) == OpLevel(member2) ? "the same" : "a higher");
----------------------- End of diff -----------------------