Log message: Added OPLEVELS feature, which makes it possible to disable the +Au/oplevels stuff.
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@952
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2003-06-22 Bas Steendijk <steendijk@xs4all.nl>
+
+ * 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 <vampire@p16.pub.ro>
* ircd/res_adns.c: included sys/types.h, for non-Linux
2003-06-17 Alex Badea <vampire@p16.pub.ro>
* ircd/res_adns.c: included sys/types.h, for non-Linux
# "LOCOP_SEE_IN_SECRET_CHANNELS" = "FALSE";
# "LOCOP_WIDE_GLINE" = "FALSE";
# "LOCOP_LIST_CHAN" = "FALSE";
# "LOCOP_SEE_IN_SECRET_CHANNELS" = "FALSE";
# "LOCOP_WIDE_GLINE" = "FALSE";
# "LOCOP_LIST_CHAN" = "FALSE";
};
# Well, you have now reached the end of this sample configuration
};
# Well, you have now reached the end of this sample configuration
FEAT_HIDDEN_IP,
FEAT_AUTOHIDE,
FEAT_CONNEXIT_NOTICES,
FEAT_HIDDEN_IP,
FEAT_AUTOHIDE,
FEAT_CONNEXIT_NOTICES,
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
* who then will educate them on the use of Apass/upass.
*/
* 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 */
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);
+ 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
/* 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
/* set op-level of member being opped */
if ((state->cli_change[i].flag & (MODE_ADD | MODE_CHANOP)) ==
/* set op-level of member being opped */
if ((state->cli_change[i].flag & (MODE_ADD | MODE_CHANOP)) ==
break;
case 'A': /* deal with Admin passes */
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 */
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;
mode_parse_upass(&state, flag_p);
break;
F_S(HIDDEN_IP, 0, "127.0.0.1", 0),
F_B(AUTOHIDE, 0, 1, 0),
F_B(CONNEXIT_NOTICES, 0, 0, 0),
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),
/* features that probably should not be touched */
F_I(KILLCHASETIMELIMIT, 0, 30, 0),
#include "numeric.h"
#include "numnicks.h"
#include "send.h"
#include "numeric.h"
#include "numnicks.h"
#include "send.h"
+#include "ircd_features.h"
return send_reply(sptr, ERR_USERNOTINCHANNEL, cli_name(who), chptr->chname);
/* Don't allow to kick member with a higher or equal op-level */
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");
return send_reply(sptr, ERR_NOTLOWEROPLEVEL, cli_name(who), chptr->chname,
OpLevel(member2), OpLevel(member), "kick",
OpLevel(member) == OpLevel(member2) ? "the same" : "a higher");