AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $unet_cv_with_maxcon,
[Maximum number of network connections])
-dnl Old OGN ircu compatibility checks.
-unet_cv_enable_compat="yes"
-AC_MSG_CHECKING([whether to enable OGN-compat mode])
-AC_ARG_ENABLE([compat],
- [ --enable-compat Enables OGN-compat mode.],
- [unet_cv_enable_compat=$enable_compat],
-)
-AC_MSG_RESULT([$unet_cv_enable_compat])
-
-if test $unet_cv_enable_compat = "no" ; then
- # do nothing
- unet_cv_enable_compat="no"
-else
- AC_DEFINE([OLD_OGN_IRCU_COMPAT], 1, [Enable compatibility mode.])
-fi
-
-dnl Check whether to enable unstable features.
-unet_cv_enable_unstable="no"
-AC_MSG_CHECKING([whether to enable unstable features])
-AC_ARG_ENABLE([unstable],
- [ --enable-unstable Enables unstable features.],
- [unet_cv_enable_unstable=$enable_unstable],
-)
-AC_MSG_RESULT([$unet_cv_enable_unstable])
-
-if test $unet_cv_enable_unstable = "yes" ; then
- AC_DEFINE([WITH_UNSTABLE_FEAT], 1, [Enable unstable features.])
-fi
-
-
unet_cv_enable_gnutls="no"
unet_cv_enable_openssl="yes"
Chroot: $unet_cv_with_chroot
OpenSSL: $unet_cv_enable_openssl
GnuTLS: $unet_cv_enable_gnutls
- Compatibility mode: $unet_cv_enable_compat
- Unstable features: $unet_cv_enable_unstable
Domain: $unet_cv_with_domain
DPath: $unet_cv_with_dpath
# "URLREG" = "http://cservice.undernet.org/live/";
# "LOC_ENABLE" = "FALSE";
# "LOC_TARGET" = "somenick";
-# "EXCEPT_ENABLE" = "TRUE";
# "NOAMSG_TIME" = "0";
# "NOAMSG_NUM" = "1";
};
to. If the nick is not online or has not umode +S or is not on a
services server, the LOC request is discarded.
-EXCEPT_ENABLE
- * Type: boolean
- * Default: TRUE
-
-If enabled, then channel ops are allowed to set/unset ban exceptions (cmode +e).
-If disabled, then only servers can set this mode.
-
NOAMSG_TIME
* Type: integer
* Default: 0
#define MODE_UPASS 0x100000
#define MODE_APASS 0x200000
#define MODE_WASDELJOINS 0x400000 /**< Not DELJOINS, but some joins pending */
-#define MODE_EXCEPTION 0x800000 /**< ban exceptions */
+
#define MODE_NOAMSGS 0x1000000 /**< No multi target messages */
#define MODE_NONOTICE 0x2000000 /**< No channel notices */
#define MODE_QUARANTINE 0x4000000 /**< No channel notices */
#define MODE_NOFLOOD 0x400000000LLU /**< +f NoFlood */
/** mode flags which take another parameter (With PARAmeterS)
*/
-#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS|MODE_EXCEPTION|MODE_ALTCHAN|MODE_ACCESS|MODE_NOFLOOD)
+#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS|MODE_ALTCHAN|MODE_ACCESS|MODE_NOFLOOD)
/** Available Channel modes */
#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AcCbiklmMnNopstuUvrDRzQu" : "cCbiklmMnNopstuvrDRzQu"
extern int debuglevel;
extern char* debugmode;
extern int running;
-extern char* dpath;
#endif /* INCLUDED_ircd_h */
FEAT_WEBIRC_REJECT,
FEAT_LOC_ENABLE,
FEAT_LOC_TARGET,
- FEAT_EXCEPT_ENABLE,
FEAT_NOAMSG_TIME,
FEAT_NOAMSG_NUM,
#define RPL_ISSUEDINVITE 345 /* Undernet extension */
#define RPL_INVITELIST 346 /* IRCnet, Undernet extension */
#define RPL_ENDOFINVITELIST 347 /* IRCnet, Undernet extension */
-#define RPL_EXCEPTIONLIST 348 /* IRCu-Patchset Extension */
-#define RPL_ENDOFEXCEPTIONLIST 349 /* IRCu-Patchset Extension */
/* RPL_EXCEPTLIST 348 IRCnet extension */
/* RPL_ENDOFEXCEPTLIST 349 IRCnet extension */
assert(0 != cptr);
assert(0 != chptr);
- for (lp = chptr->banlist; lp; lp = lp->next) {
- if(!(lp->flags & BAN_EXCEPTION))
- send_reply(cptr, RPL_BANLIST, chptr->chname, lp->banstr,
- lp->who, lp->when);
- }
+ for (lp = chptr->banlist; lp; lp = lp->next)
+ send_reply(cptr, RPL_BANLIST, chptr->chname, lp->banstr, lp->who, lp->when);
send_reply(cptr, RPL_ENDOFBANLIST, chptr->chname);
}
-/** send an exceptionlist to a client for a channel
- *
- * @param cptr Client to send the exceptionlist to.
- * @param chptr Channel whose exceptionlist to send.
- */
-static void send_exception_list(struct Client* cptr, struct Channel* chptr)
-{
- struct Ban* lp;
-
- assert(0 != cptr);
- assert(0 != chptr);
-
- for (lp = chptr->banlist; lp; lp = lp->next) {
- if(lp->flags & BAN_EXCEPTION)
- send_reply(cptr, RPL_EXCEPTIONLIST, chptr->chname, lp->banstr,
- lp->who, lp->when);
- }
-
- send_reply(cptr, RPL_ENDOFEXCEPTIONLIST, chptr->chname);
-}
-
/** Get a channel block, creating if necessary.
* Get Channel block for chname (and allocate a new channel
* block, if it didn't exists before).
MODE_PERSIST, 'z',
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
-/* MODE_EXCEPTION, 'e', */
/* MODE_ALTCHAN, 'F', */
/* MODE_NOFLOOD, 'f', */
MODE_ACCESS, 'a',
bufptr[(*bufptr_i)++] = MB_TYPE(mbuf, i) & MODE_CHANOP ? 'o' : 'v';
totalbuflen -= IRCD_MAX(9, tmp) + 1;
}
- } else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD)) {
+ } else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD)) {
tmp = strlen(MB_STRING(mbuf, i));
if ((totalbuflen - tmp) <= 0) /* don't overflow buffer */
MB_TYPE(mbuf, i) |= MODE_SAVE; /* save for later */
else {
char mode_char;
- switch(MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
+ switch(MB_TYPE(mbuf, i) & (MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
{
case MODE_APASS:
mode_char = 'A';
case MODE_UPASS:
mode_char = 'U';
break;
- case MODE_EXCEPTION:
- mode_char = 'e';
- break;
case MODE_ALTCHAN:
mode_char = 'F';
break;
build_string(strptr, strptr_i, cli_name(MB_CLIENT(mbuf, i)), 0, ' ');
/* deal with bans... */
- else if (MB_TYPE(mbuf, i) & (MODE_BAN | MODE_EXCEPTION))
+ else if (MB_TYPE(mbuf, i) & (MODE_BAN))
build_string(strptr, strptr_i, MB_STRING(mbuf, i), 0, ' ');
/* deal with keys... */
build_string(strptr, strptr_i, NumNick(MB_CLIENT(mbuf, i)), ' ');
/* deal with modes that take strings */
- else if (MB_TYPE(mbuf, i) & (MODE_KEY | MODE_BAN | MODE_EXCEPTION | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
+ else if (MB_TYPE(mbuf, i) & (MODE_KEY | MODE_BAN | MODE_APASS | MODE_UPASS | MODE_ALTCHAN | MODE_NOFLOOD))
build_string(strptr, strptr_i, MB_STRING(mbuf, i), 0, ' ');
/*
MODE_PERSIST, 'z',
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
-/* MODE_EXCEPTION, 'e', */
MODE_NOAMSGS, 'M',
MODE_NONOTICE, 'N',
MODE_QUARANTINE, 'Q',
#define DONE_KEY_DEL 0x80 /**< We've removed the key */
#define DONE_UPASS_DEL 0x100 /**< We've removed the user pass */
#define DONE_APASS_DEL 0x200 /**< We've removed the admin pass */
-#define DONE_EXCEPTIONLIST 0x400 /**< We've sent the exception list */
#define DONE_ALTCHAN 0x800 /**< We've set the altchan */
#define DONE_ACCESS 0x1000 /**< We've set the access */
#define DONE_NOFLOOD 0x2000 /**< We've set the noflood options */
struct Ban *ban, *newban;
if (state->parc <= 0) { /* Not enough args, send ban list */
- if (MyUser(state->sptr)) {
- if (*flag_p == MODE_EXCEPTION) {
- if (!(state->done & DONE_EXCEPTIONLIST)) {
- send_exception_list(state->sptr, state->chptr);
- state->done |= DONE_EXCEPTIONLIST;
- }
- }
- else {
- if (!(state->done & DONE_BANLIST)) {
- send_ban_list(state->sptr, state->chptr);
- state->done |= DONE_BANLIST;
- }
- }
+ if (MyUser(state->sptr) && !(state->done & DONE_BANLIST)) {
+ send_ban_list(state->sptr, state->chptr);
+ state->done |= DONE_BANLIST;
}
return;
}
} else if (ban->flags & BAN_DEL) { /* Deleted a ban? */
char *bandup;
DupString(bandup, ban->banstr);
- modebuf_mode_string(state->mbuf, MODE_DEL | ((ban->flags & BAN_EXCEPTION) ? MODE_EXCEPTION : MODE_BAN),
- bandup, 1);
+ modebuf_mode_string(state->mbuf, MODE_DEL | MODE_BAN, bandup, 1);
if (state->flags & MODE_PARSE_SET) { /* Ok, make it take effect */
if (prevban) /* clip it out of the list... */
char *bandup;
/* add the ban to the buffer */
DupString(bandup, ban->banstr);
- modebuf_mode_string(state->mbuf, MODE_ADD | ((ban->flags & BAN_EXCEPTION) ? MODE_EXCEPTION : MODE_BAN),
- bandup, 1);
+ modebuf_mode_string(state->mbuf, MODE_ADD | MODE_BAN, bandup, 1);
if (state->flags & MODE_PARSE_SET) { /* create a new ban */
newban = make_ban(ban->banstr);
strcpy(newban->who, ban->who);
newban->when = ban->when;
- newban->flags = ban->flags & (BAN_IPMASK | BAN_EXCEPTION);
+ newban->flags = ban->flags & BAN_IPMASK;
newban->next = state->chptr->banlist; /* and link it in */
state->chptr->banlist = newban;
MODE_PERSIST, 'z',
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
-/* MODE_EXCEPTION, 'e',*/
MODE_NOAMSGS, 'M',
MODE_NONOTICE, 'N',
MODE_QUARANTINE, 'Q',
if (IsServer(cptr) || feature_bool(FEAT_OPLEVELS))
mode_parse_upass(&state, flag_p);
break;
-
-/* case 'e':
- if(MyUser(state.sptr) && !(state.flags & MODE_PARSE_FORCE) && !feature_bool(FEAT_EXCEPT_ENABLE)) break;*/
case 'b': /* deal with bans */
mode_parse_ban(&state, flag_p);
break;
* (x || 1) is used to continue in a logical-and series even when !x.
* (x && 0) is used to continue in a logical-or series even when x.
*/
-#ifdef OLD_OGN_IRCU_COMPAT
- #define GL_EXPIRED(gl) ((gl)->gl_lifetime <= CurrentTime)
-#else
- #define GL_EXPIRED(gl) ((gl)->gl_lifetime <= CurrentTime || (gl)->gl_expire <= CurrentTime)
-#endif
+#define GL_EXPIRED(gl) ((gl)->gl_lifetime <= CurrentTime || (gl)->gl_expire <= CurrentTime)
#define gliter(list, gl, next) \
/* Iterate through the G-lines in the list */ \
for ((gl) = (list); (gl); (gl) = (next)) \
assert(gline->gl_lastmod);
-#ifdef OLD_OGN_IRCU_COMPAT
- sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
- GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire - CurrentTime, gline->gl_lastmod,
- /*gline->gl_lifetime,*/ gline->gl_reason);
-#else
sendcmdto_serv_butone(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_host ? "@" : "",
gline->gl_host ? gline->gl_host : "",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
-#endif
return 0;
}
}
}
if(expire <= CurrentTime) disable_gl = 1;
-#ifdef OLD_OGN_IRCU_COMPAT
- /* Compatibility issue:
- * The ircu prior to ircu-2.10.12.10 has no lifetime, therefore, we force
- * the lifetime to be the same as the expiration time here. This allows to
- * remove glines by setting the expiration-time to a smaller value than CurrentTime.
- * This has to be removed when the full ircu-2.10.12.10 gline features
- * want to be used on the whole network.
- */
- lifetime = expire;
- flags |= GLINE_LIFETIME;
-#endif
} else {
flags &= ~GLINE_EXPIRE;
expire = 0;
lifetime = IRCD_MAX(lifetime, expire); /* set lifetime to the max */
-#ifdef OLD_OGN_IRCU_COMPAT
- flags |= GLINE_LIFETIME;
-#else
/* OK, let's see which is greater... */
if (lifetime > gline->gl_lifetime)
flags |= GLINE_LIFETIME; /* have to update lifetime */
flags &= ~GLINE_LIFETIME; /* no change to lifetime */
lifetime = 0;
}
-#endif
/* Finally, let's see if the reason needs to be updated */
if ((flags & GLINE_REASON) && reason &&
/* We'll be simple for this release, but we can update this to change
* the propagation syntax on future updates
*/
-#ifdef OLD_OGN_IRCU_COMPAT
- if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE)
- sendcmdto_serv_butone(sptr, CMD_GLINE, cptr,
- "* %s%s%s%s%s %Tu %Tu :%s",
- flags & GLINE_OPERFORCE ? "!" : "", op,
- gline->gl_user, gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire, gline->gl_lastmod,
- /*gline->gl_lifetime,*/ gline->gl_reason);
-#else
if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE)
sendcmdto_serv_butone(sptr, CMD_GLINE, cptr,
"* %s%s%s%s%s %Tu %Tu %Tu :%s",
gline->gl_host ? gline->gl_host : "",
gline->gl_expire, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
-#endif
/* OK, let's do the G-line... */
if(disable_gl) return 0;
struct Gline *gline;
struct Gline *sgline;
-#ifdef OLD_OGN_IRCU_COMPAT
- gliter(GlobalGlineList, gline, sgline) {
- if (!GlineIsLocal(gline) && gline->gl_lastmod)
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
- GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire - CurrentTime, gline->gl_lastmod,
- /*gline->gl_lifetime,*/ gline->gl_reason);
- }
- gliter(BadChanGlineList, gline, sgline) {
- if (!GlineIsLocal(gline) && gline->gl_lastmod)
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s %Tu %Tu :%s",
- GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
- gline->gl_expire - CurrentTime, gline->gl_lastmod,
- /*gline->gl_lifetime,*/ gline->gl_reason);
- }
-#else
gliter(GlobalGlineList, gline, sgline) {
if (!GlineIsLocal(gline) && gline->gl_lastmod)
sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
}
+
gliter(BadChanGlineList, gline, sgline) {
if (!GlineIsLocal(gline) && gline->gl_lastmod)
sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s %Tu %Tu %Tu :%s",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
}
-#endif
}
/** Send a G-line to another server.
if (GlineIsLocal(gline) || !gline->gl_lastmod)
return 0;
-#ifdef OLD_OGN_IRCU_COMPAT
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
- GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire - CurrentTime, gline->gl_lastmod,
- /*gline->gl_lifetime,*/ gline->gl_reason);
-#else
sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_host ? "@" : "",
gline->gl_host ? gline->gl_host : "",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
gline->gl_lifetime, gline->gl_reason);
-#endif
return 0;
}
char *configfile = CPATH; /**< Server configuration file */
int debuglevel = -1; /**< Server debug level */
char *debugmode = ""; /**< Server debug level */
-char *dpath = DPATH; /**< Working directory for daemon */
+static char *dpath = DPATH; /**< Working directory for daemon */
static char *dbg_client; /**< Client specifier for chkconf */
static struct Timer connect_timer; /**< timer structure for try_connections() */
F_B(WEBIRC_REJECT, 0, 1, 0),
F_B(LOC_ENABLE, 0, 0, 0),
F_S(LOC_TARGET, FEAT_NULL, 0, 0),
- F_B(EXCEPT_ENABLE, 0, 1, 0),
F_I(NOAMSG_TIME, 0, 0, 0),
F_I(NOAMSG_NUM, 0, 1, 0),
{ "gb", GBYTES },
{ "gigabytes", GBYTES },
{ "gline", TPRIV_GLINE },
-#ifdef OLD_OGN_IRCU_COMPAT
{ "hide_channels", TPRIV_UMODE_NOCHAN },
{ "hide_idletime", TPRIV_UMODE_NOIDLE },
-#endif
{ "umode_nochan", TPRIV_UMODE_NOCHAN },
{ "umode_noidle", TPRIV_UMODE_NOIDLE },
{ "extra_hide_idletime", TPRIV_HIDE_IDLETIME },
-#ifndef OLD_OGN_IRCU_COMPAT
{ "hide_idletime", TPRIV_HIDE_IDLETIME },
-#endif
{ "ipv4", TOK_IPV4 },
{ "ipv6", TOK_IPV6 },
{ "kb", KBYTES },
{ "set", TPRIV_SET },
{ "show_all_invis", TPRIV_SHOW_ALL_INVIS },
{ "show_invis", TPRIV_SHOW_INVIS },
-#ifdef OLD_OGN_IRCU_COMPAT
{ "targetchange", TPRIV_UNLIMITED_TARGET },
-#endif
{ "unlimited_targets", TPRIV_UNLIMITED_TARGET },
{ "tb", TBYTES },
{ "terabytes", TBYTES },
/* 347 */
{ RPL_ENDOFINVITELIST, ":End of Invite List", "347" },
/* 348 */
- { RPL_EXCEPTIONLIST, "%s %s %s %Tu", "348" },
+ { 0 },
/* 349 */
- { RPL_ENDOFEXCEPTIONLIST, "%s :End of Channel Exception List", "349" },
+ { 0 },
/* 350 */
{ 0 },
/* 351 */
return 0;
}
-/* Refreshs the users host to the current fakehost. If no fakehost
- * is set, the account-host is created. If no Account is set,
- * nothing is done.
- * Returns 1 if the host changed and 0 if not.
- */
-int apply_fakehost(struct Client *cptr) {
- char buf[HOSTLEN];
- if(IsFakeHost(cptr)) {
- ircd_strncpy(buf, cli_user(cptr)->fakehost, HOSTLEN);
- }
- else if (IsAccount(cptr)) {
- ircd_snprintf(0, buf, HOSTLEN, "%s.%s", cli_user(cptr)->account, feature_str(FEAT_HIDDEN_HOST));
- }
- if(strncmp(buf, cli_user(cptr)->host, HOSTLEN) == 0) return 0;
- ircd_strncpy(cli_user(cptr)->host, buf, HOSTLEN);
- return 1;
-}
-
/** Calculate the hash value for a target.
* @param[in] target Pointer to target, cast to unsigned int.
* @return Hash value constructed from the pointer.