mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 16:33:14 +02:00
Added a set::gline-address which works like set::kline-address
This commit is contained in:
@@ -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