| 59 |
|
return; |
| 60 |
|
|
| 61 |
|
if (TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN) |
| 62 |
< |
{ |
| 63 |
< |
/* |
| 64 |
< |
* a server with the wrong TS version connected; since we're |
| 65 |
< |
* TS_ONLY we can't fall back to the non-TS protocol so |
| 66 |
< |
* we drop the link -orabidoo |
| 67 |
< |
*/ |
| 68 |
< |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
| 62 |
> |
{ |
| 63 |
> |
/* |
| 64 |
> |
* a server with the wrong TS version connected; since we're |
| 65 |
> |
* TS_ONLY we can't fall back to the non-TS protocol so |
| 66 |
> |
* we drop the link -orabidoo |
| 67 |
> |
*/ |
| 68 |
> |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
| 69 |
|
"Link %s dropped, wrong TS protocol version (%s,%s)", |
| 70 |
|
get_client_name(source_p, SHOW_IP), parv[1], parv[2]); |
| 71 |
< |
sendto_realops_flags(UMODE_ALL, L_OPER, |
| 71 |
> |
sendto_realops_flags(UMODE_ALL, L_OPER, |
| 72 |
|
"Link %s dropped, wrong TS protocol version (%s,%s)", |
| 73 |
|
get_client_name(source_p, MASK_IP), parv[1], parv[2]); |
| 74 |
< |
exit_client(source_p, source_p, "Incompatible TS version"); |
| 75 |
< |
return; |
| 76 |
< |
} |
| 74 |
> |
exit_client(source_p, source_p, "Incompatible TS version"); |
| 75 |
> |
return; |
| 76 |
> |
} |
| 77 |
|
|
| 78 |
|
/* |
| 79 |
|
* since we're here, might as well set CurrentTime while we're at it |
| 83 |
|
deltat = abs(theirtime - CurrentTime); |
| 84 |
|
|
| 85 |
|
if (deltat > ConfigFileEntry.ts_max_delta) |
| 86 |
< |
{ |
| 87 |
< |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
| 86 |
> |
{ |
| 87 |
> |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
| 88 |
|
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)", |
| 89 |
|
get_client_name(source_p, SHOW_IP), |
| 90 |
|
(unsigned long) CurrentTime, |
| 91 |
|
(unsigned long) theirtime, |
| 92 |
|
(int) deltat); |
| 93 |
< |
sendto_realops_flags(UMODE_ALL, L_OPER, |
| 93 |
> |
sendto_realops_flags(UMODE_ALL, L_OPER, |
| 94 |
|
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)", |
| 95 |
|
get_client_name(source_p, MASK_IP), |
| 96 |
|
(unsigned long) CurrentTime, |
| 97 |
|
(unsigned long) theirtime, |
| 98 |
|
(int) deltat); |
| 99 |
< |
ilog(LOG_TYPE_IRCD, |
| 100 |
< |
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)", |
| 101 |
< |
get_client_name(source_p, SHOW_IP), |
| 102 |
< |
(unsigned long) CurrentTime, |
| 103 |
< |
(unsigned long) theirtime, |
| 104 |
< |
(int) deltat); |
| 105 |
< |
exit_client(source_p, source_p, "Excessive TS delta"); |
| 106 |
< |
return; |
| 107 |
< |
} |
| 99 |
> |
ilog(LOG_TYPE_IRCD, |
| 100 |
> |
"Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)", |
| 101 |
> |
get_client_name(source_p, SHOW_IP), |
| 102 |
> |
(unsigned long) CurrentTime, |
| 103 |
> |
(unsigned long) theirtime, |
| 104 |
> |
(int) deltat); |
| 105 |
> |
exit_client(source_p, source_p, "Excessive TS delta"); |
| 106 |
> |
return; |
| 107 |
> |
} |
| 108 |
|
|
| 109 |
|
if (deltat > ConfigFileEntry.ts_warn_delta) |
| 110 |
< |
{ |
| 111 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, |
| 110 |
> |
sendto_realops_flags(UMODE_ALL, L_ALL, |
| 111 |
|
"Link %s notable TS delta (my TS=%lu, their TS=%lu, delta=%d)", |
| 112 |
|
source_p->name, |
| 113 |
|
(unsigned long) CurrentTime, |
| 114 |
|
(unsigned long) theirtime, |
| 115 |
|
(int) deltat); |
| 117 |
– |
} |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
static struct Message svinfo_msgtab = { |