s_user: enhancements to proxy reporting messages
This commit is contained in:
parent
ce58d2dc61
commit
2a104d6641
1 changed files with 44 additions and 25 deletions
|
@ -468,16 +468,32 @@ register_local_user(struct Client *client_p, struct Client *source_p)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'O': /* OPM */
|
case 'O': /* OPM */
|
||||||
|
{
|
||||||
|
char *proxy = source_p->preClient->auth.data;
|
||||||
|
char *port = strrchr(proxy, ':');
|
||||||
|
|
||||||
|
if(port == NULL)
|
||||||
|
{
|
||||||
|
ierror("authd sent us a malformed OPM string");
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||||
|
"authd sent us a malformed OPM string: %s", proxy);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Terminate the proxy type */
|
||||||
|
*(port++) = '\0';
|
||||||
|
|
||||||
if(IsExemptKline(source_p) || IsConfExemptProxy(aconf))
|
if(IsExemptKline(source_p) || IsConfExemptProxy(aconf))
|
||||||
{
|
{
|
||||||
sendto_one_notice(source_p, ":*** Your IP address %s has been detected as an open proxy (ip:port %s), but you are exempt",
|
sendto_one_notice(source_p,
|
||||||
source_p->sockhost, source_p->preClient->auth.data);
|
":*** Your IP address %s has been detected as an open proxy (type %s, port %s), but you are exempt",
|
||||||
|
source_p->sockhost, proxy, port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sendto_realops_snomask(SNO_REJ, L_NETWIDE,
|
sendto_realops_snomask(SNO_REJ, L_NETWIDE,
|
||||||
"Open proxy %s: %s (%s@%s) [%s] [%s]",
|
"Open proxy %s/%s: %s (%s@%s) [%s] [%s]",
|
||||||
source_p->preClient->auth.data,
|
proxy, port,
|
||||||
source_p->name,
|
source_p->name,
|
||||||
source_p->username, source_p->host,
|
source_p->username, source_p->host,
|
||||||
IsIPSpoof(source_p) ? "255.255.255.255" : source_p->sockhost,
|
IsIPSpoof(source_p) ? "255.255.255.255" : source_p->sockhost,
|
||||||
|
@ -488,13 +504,16 @@ register_local_user(struct Client *client_p, struct Client *source_p)
|
||||||
sendto_one(source_p, form_str(ERR_YOUREBANNEDCREEP),
|
sendto_one(source_p, form_str(ERR_YOUREBANNEDCREEP),
|
||||||
me.name, source_p->name, reason);
|
me.name, source_p->name, reason);
|
||||||
|
|
||||||
sendto_one_notice(source_p, ":*** Your IP address %s has been detected as an open proxy (ip:port %s)",
|
sendto_one_notice(source_p,
|
||||||
source_p->sockhost, source_p->preClient->auth.data);
|
":*** Your IP address %s has been detected as an open proxy (type %s, port %s)",
|
||||||
|
source_p->sockhost, proxy, port);
|
||||||
add_reject(source_p, NULL, NULL);
|
add_reject(source_p, NULL, NULL);
|
||||||
exit_client(client_p, source_p, &me, "*** Banned (Open proxy)");
|
exit_client(client_p, source_p, &me, "*** Banned (Open proxy)");
|
||||||
substitution_free(&varlist);
|
substitution_free(&varlist);
|
||||||
return CLIENT_EXITED;
|
return CLIENT_EXITED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default: /* Unknown, but handle the case properly */
|
default: /* Unknown, but handle the case properly */
|
||||||
if (IsExemptKline(source_p))
|
if (IsExemptKline(source_p))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue