* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: s_conf.c 3159 2007-01-25 07:08:21Z nenolod $
+ * $Id: s_conf.c 3550 2007-08-09 06:47:26Z nenolod $
*/
#include "stdinc.h"
break;
case TOO_MANY_LOCAL:
+ /* Note that these notices are sent to opers on other
+ * servers also, so even if local opers are allowed to
+ * see the IP, we still cannot send it.
+ */
sendto_realops_snomask(SNO_FULL, L_NETWIDE,
"Too many local connections for %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
- source_p->username, source_p->sockhost);
+ source_p->username,
+ show_ip(NULL, source_p) && !IsIPSpoof(source_p) ? source_p->sockhost : source_p->host);
ilog(L_FUSER, "Too many local connections from %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
sendto_realops_snomask(SNO_FULL, L_NETWIDE,
"Too many global connections for %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
- source_p->username, source_p->sockhost);
+ source_p->username,
+ show_ip(NULL, source_p) && !IsIPSpoof(source_p) ? source_p->sockhost : source_p->host);
ilog(L_FUSER, "Too many global connections from %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
source_p->username, source_p->sockhost);
sendto_realops_snomask(SNO_FULL, L_NETWIDE,
"Too many user connections for %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
- source_p->username, source_p->sockhost);
+ source_p->username,
+ show_ip(NULL, source_p) && !IsIPSpoof(source_p) ? source_p->sockhost : source_p->host);
ilog(L_FUSER, "Too many user connections from %s!%s%s@%s",
source_p->name, IsGotId(source_p) ? "" : "~",
source_p->username, source_p->sockhost);
"I-line is full for %s!%s%s@%s (%s).",
source_p->name, IsGotId(source_p) ? "" : "~",
source_p->username, source_p->host,
- source_p->sockhost);
+ show_ip(NULL, source_p) && !IsIPSpoof(source_p) ? source_p->sockhost : "255.255.255.255");
ilog(L_FUSER, "Too many connections from %s!%s%s@%s.",
source_p->name, IsGotId(source_p) ? "" : "~",
{
if(aconf->flags & CONF_FLAGS_REDIR)
{
- sendto_one(client_p, form_str(RPL_REDIR),
- me.name, client_p->name,
+ sendto_one_numeric(client_p, RPL_REDIR, form_str(RPL_REDIR),
aconf->name ? aconf->name : "", aconf->port);
return (NOT_AUTHORISED);
}
}
else if(aconf->status & CONF_GLINE)
{
- sendto_one(client_p, ":%s NOTICE %s :*** G-lined", me.name, client_p->name);
+ sendto_one_notice(client_p, ":*** G-lined");
if(ConfigFileEntry.kline_with_reason)
sendto_one(client_p,
}
else
{
- sendto_one(client_p, ":%s NOTICE %s :*** I: line is full, but you have an >I: line!",
- me.name, client_p->name);
+ sendto_one_notice(client_p, ":*** I: line is full, but you have an >I: line!");
SetExemptLimits(client_p);
}
memset(&ServerInfo.ip6, 0, sizeof(ServerInfo.ip6));
ServerInfo.specific_ipv6_vhost = 0;
#endif
- ServerInfo.use_ts6 = YES;
/* Don't reset hub, as that will break lazylinks */
/* ServerInfo.hub = NO; */
ConfigChannel.max_bans = 25;
ConfigChannel.max_bans_large = 500;
ConfigChannel.burst_topicwho = NO;
- ConfigChannel.invite_ops_only = YES;
ConfigChannel.kick_on_split_riding = NO;
ConfigChannel.default_split_user_count = 15000;
ConfigFileEntry.reject_after_count = 5;
ConfigFileEntry.reject_ban_time = 300;
ConfigFileEntry.reject_duration = 120;
-
+ ConfigFileEntry.max_unknown_ip = 2;
+
+ ServerInfo.max_clients = comm_get_maxconnections() - MAX_BUFFER;
}
#undef YES
reason, oper_reason);
}
- sendto_one(source_p,
- ":%s NOTICE %s :Added D-Line [%s] to %s", me.name,
- source_p->name, host, filename);
+ sendto_one_notice(source_p, ":Added D-Line [%s] to %s", host, filename);
}
else if(type == RESV_TYPE)