mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-29 14:26:40 +02:00
Added a set::gline-address which works like set::kline-address
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -27,7 +27,7 @@ English | <a href="unreal32docs.de.html">German</a> |
|
||||
<div align="center"><b><font size="7">UnrealIRCd</font></b><br>
|
||||
<font size="4"><a href="http://www.unrealircd.com">http://www.unrealircd.com</a></font><br>
|
||||
<font size="4">Version: 3.2.2-CVS</font><br>
|
||||
<b>Last doc update:</b> 2004-10-13</div>
|
||||
<b>Last doc update:</b> 2004-12-01</div>
|
||||
<br>
|
||||
<b>Head Coders:</b> Stskeeps / codemastr / Syzop / Luke<br>
|
||||
<b>Contributors:</b> McSkaf / Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk<br>
|
||||
@@ -2066,6 +2066,8 @@ set {
|
||||
<p><font class="set">set::kline-address <email-address>;</font><br>
|
||||
The email address that K:line questions should be sent to. This value must be
|
||||
specified.</p>
|
||||
<p><font class="set">set::gline-address <email-address>;</font><br>
|
||||
The email address that G:line questions should be sent to.</p>
|
||||
<p><font class="set">set::modes-on-connect <+modes>;</font><br>
|
||||
The modes that will be set on a user at connection.</p>
|
||||
<p><font class="set">set::snomask-on-connect <+modes></font><br>
|
||||
|
||||
+4
-1
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
|
||||
+23
-20
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user