diff --git a/Changes b/Changes index 4aaf3b083..f21c0dcc9 100644 --- a/Changes +++ b/Changes @@ -486,3 +486,5 @@ - Fixed alloca warning @ Linux (post-3.2.2) - Numeric audit: 15 small changes (int/long mismatches etc). This might have fixed some bugs on architectures where 'long' and 'int' have different sizes (eg: opteron). +- Added a set::gline-address which works like set::kline-address (#0001298) suggested by + Bugz. diff --git a/doc/unreal32docs.html b/doc/unreal32docs.html index 58b41cc9a..ad05a0fe9 100644 --- a/doc/unreal32docs.html +++ b/doc/unreal32docs.html @@ -27,7 +27,7 @@ English | German |
+ Last doc update: 2004-12-01set::kline-address <email-address>;
The email address that K:line questions should be sent to. This value must be
specified.
set::gline-address <email-address>;
+ The email address that G:line questions should be sent to.
set::modes-on-connect <+modes>;
The modes that will be set on a user at connection.
set::snomask-on-connect <+modes>
diff --git a/include/dynconf.h b/include/dynconf.h
index 5050b9dad..d3eb1e9d6 100644
--- a/include/dynconf.h
+++ b/include/dynconf.h
@@ -91,6 +91,7 @@ struct zConfiguration {
char throttle_count;
#endif
char *kline_address;
+ char *gline_address;
long conn_modes;
long oper_modes;
char *oper_snomask;
@@ -151,7 +152,8 @@ struct zConfiguration {
extern MODVAR aConfiguration iConf;
#endif
-#define KLINE_ADDRESS iConf.kline_address
+#define KLINE_ADDRESS iConf.kline_address
+#define GLINE_ADDRESS iConf.gline_address
#define CONN_MODES iConf.conn_modes
#define OPER_MODES iConf.oper_modes
#define OPER_SNOMASK iConf.oper_snomask
@@ -268,6 +270,7 @@ struct SetCheck {
unsigned has_throttle_connections:1;
#endif
unsigned has_kline_address:1;
+ unsigned has_gline_address:1;
unsigned has_modes_on_connect:1;
unsigned has_modes_on_oper:1;
unsigned has_snomask_on_connect:1;
diff --git a/src/modules/m_stats.c b/src/modules/m_stats.c
index 14defeb7d..67b5b118f 100644
--- a/src/modules/m_stats.c
+++ b/src/modules/m_stats.c
@@ -1214,6 +1214,9 @@ int stats_set(aClient *sptr, char *para)
CLOAK_KEYCRC);
sendto_one(sptr, ":%s %i %s :kline-address: %s", me.name, RPL_TEXT,
sptr->name, KLINE_ADDRESS);
+ if (GLINE_ADDRESS)
+ sendto_one(sptr, ":%s %i %s :gline-address: %s", me.name, RPL_TEXT,
+ sptr->name, GLINE_ADDRESS);
sendto_one(sptr, ":%s %i %s :modes-on-connect: %s", me.name, RPL_TEXT,
sptr->name, get_modestr(CONN_MODES));
sendto_one(sptr, ":%s %i %s :modes-on-oper: %s", me.name, RPL_TEXT,
diff --git a/src/s_conf.c b/src/s_conf.c
index cf6728acc..14e34a34e 100644
--- a/src/s_conf.c
+++ b/src/s_conf.c
@@ -1452,6 +1452,7 @@ void free_iConf(aConfiguration *i)
{
ircfree(i->name_server);
ircfree(i->kline_address);
+ ircfree(i->gline_address);
ircfree(i->auto_join_chans);
ircfree(i->oper_auto_join_chans);
ircfree(i->oper_only_stats);
@@ -6337,6 +6338,9 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
if (!strcmp(cep->ce_varname, "kline-address")) {
ircstrdup(tempiConf.kline_address, cep->ce_vardata);
}
+ if (!strcmp(cep->ce_varname, "gline-address")) {
+ ircstrdup(tempiConf.gline_address, cep->ce_vardata);
+ }
else if (!strcmp(cep->ce_varname, "modes-on-connect")) {
tempiConf.conn_modes = (long) set_usermode(cep->ce_vardata);
}
@@ -6758,6 +6762,23 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
errors++; continue;
}
}
+ else if (!strcmp(cep->ce_varname, "gline-address")) {
+ CheckNull(cep);
+ CheckDuplicate(cep, gline_address, "gline-address");
+ if (!strchr(cep->ce_vardata, '@') && !strchr(cep->ce_vardata, ':'))
+ {
+ config_error("%s:%i: set::gline-address must be an e-mail or an URL",
+ cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
+ errors++;
+ continue;
+ }
+ else if (!match("*@unrealircd.com", cep->ce_vardata) || !match("*@unrealircd.org",cep->ce_vardata) || !match("unreal-*@lists.sourceforge.net",cep->ce_vardata))
+ {
+ config_error("%s:%i: set::gline-address may not be an UnrealIRCd Team address",
+ cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
+ errors++; continue;
+ }
+ }
else if (!strcmp(cep->ce_varname, "modes-on-connect")) {
CheckNull(cep);
CheckDuplicate(cep, modes_on_connect, "modes-on-connect");
diff --git a/src/s_kline.c b/src/s_kline.c
index 24531ea87..e1d04cd4d 100644
--- a/src/s_kline.c
+++ b/src/s_kline.c
@@ -440,38 +440,41 @@ int find_tkline_match(aClient *cptr, int xx)
if (lp->type & TKL_GLOBAL)
{
ircstp->is_ref++;
- sendto_one(cptr,
- ":%s NOTICE %s :*** You are %s from %s (%s)",
- me.name, cptr->name,
- (lp->expire_at ? "banned" : "permanently banned"),
- ircnetwork, lp->reason);
+ if (GLINE_ADDRESS)
+ sendto_one(cptr, ":%s NOTICE %s :*** You are %s from %s (%s)"
+ " Email %s for more information.",
+ me.name, cptr->name,
+ (lp->expire_at ? "banned" : "permanently banned"),
+ ircnetwork, lp->reason, GLINE_ADDRESS);
+ else
+ sendto_one(cptr, ":%s NOTICE %s :*** You are %s from %s (%s)",
+ me.name, cptr->name,
+ (lp->expire_at ? "banned" : "permanently banned"),
+ ircnetwork, lp->reason);
ircsprintf(msge, "User has been %s from %s (%s)",
- (lp->expire_at ? "banned" : "permanently banned"),
- ircnetwork, lp->reason);
- return (exit_client(cptr, cptr, &me,
- msge));
+ (lp->expire_at ? "banned" : "permanently banned"),
+ ircnetwork, lp->reason);
+ return (exit_client(cptr, cptr, &me, msge));
}
else
{
ircstp->is_ref++;
- sendto_one(cptr,
- ":%s NOTICE %s :*** You are %s from %s (%s)",
- me.name, cptr->name,
- (lp->expire_at ? "banned" : "permanently banned"),
- me.name, lp->reason);
+ sendto_one(cptr, ":%s NOTICE %s :*** You are %s from %s (%s)"
+ " Email %s for more information.",
+ me.name, cptr->name,
+ (lp->expire_at ? "banned" : "permanently banned"),
+ me.name, lp->reason, KLINE_ADDRESS);
ircsprintf(msge, "User is %s (%s)",
- (lp->expire_at ? "banned" : "permanently banned"),
- lp->reason);
- return (exit_client(cptr, cptr, &me,
- msge));
+ (lp->expire_at ? "banned" : "permanently banned"),
+ lp->reason);
+ return (exit_client(cptr, cptr, &me, msge));
}
}
if (lp->type & TKL_ZAP)
{
ircstp->is_ref++;
- ircsprintf(msge,
- "Z:lined (%s)",lp->reason);
+ ircsprintf(msge, "Z:lined (%s)",lp->reason);
return exit_client(cptr, cptr, &me, msge);
}