1002 |
|
struct AccessItem *aconf; |
1003 |
|
|
1004 |
|
/* search for a kline */ |
1005 |
< |
if(MyConnect(source_p)) |
1005 |
> |
if (MyConnect(source_p)) |
1006 |
|
aconf = find_conf_by_address(source_p->host, |
1007 |
|
&source_p->localClient->ip, |
1008 |
|
CONF_KILL, |
1012 |
|
aconf = find_conf_by_address(source_p->host, NULL, CONF_KILL, |
1013 |
|
0, source_p->username, NULL); |
1014 |
|
|
1015 |
< |
if(aconf == NULL) |
1015 |
> |
if (aconf == NULL) |
1016 |
|
return; |
1017 |
|
|
1018 |
|
/* dont report a tkline as a kline */ |
1019 |
< |
if(aconf->flags & CONF_FLAGS_TEMPORARY) |
1019 |
> |
if (aconf->flags & CONF_FLAGS_TEMPORARY) |
1020 |
|
return; |
1021 |
|
|
1022 |
|
sendto_one(source_p, form_str(RPL_STATSKLINE), from, |
1203 |
|
"compression (%lu bytes data/%lu bytes wire)] recv[%.2f%% " |
1204 |
|
"compression (%lu bytes data/%lu bytes wire)]", |
1205 |
|
from, RPL_STATSDEBUG, to, target_p->name, |
1206 |
< |
zipstats.out_ratio, zipstats.out, zipstats.out_wire, |
1207 |
< |
zipstats.in_ratio, zipstats.in, zipstats.in_wire); |
1206 |
> |
zipstats.out_ratio, zipstats.out, zipstats.out_wire, |
1207 |
> |
zipstats.in_ratio, zipstats.in, zipstats.in_wire); |
1208 |
|
++sent_data; |
1209 |
|
} |
1210 |
|
} |
1218 |
|
{ |
1219 |
|
uint64_t sendB = 0, recvB = 0; |
1220 |
|
time_t uptime = 0; |
1221 |
< |
int j = 0; |
1222 |
< |
struct Client *target_p = NULL; |
1223 |
< |
dlink_node *ptr; |
1221 |
> |
dlink_node *ptr = NULL; |
1222 |
|
|
1223 |
|
if (ConfigServerHide.flatten_links && !IsOper(source_p)) |
1224 |
|
{ |
1229 |
|
|
1230 |
|
DLINK_FOREACH(ptr, serv_list.head) |
1231 |
|
{ |
1232 |
< |
target_p = ptr->data; |
1232 |
> |
struct Client *target_p = ptr->data; |
1233 |
|
|
1236 |
– |
++j; |
1234 |
|
sendB += target_p->localClient->send.bytes; |
1235 |
|
recvB += target_p->localClient->recv.bytes; |
1236 |
|
|
1252 |
|
recvB >>= 10; |
1253 |
|
|
1254 |
|
sendto_one(source_p, ":%s %d %s ? :%u total server(s)", |
1255 |
< |
from, RPL_STATSDEBUG, to, j); |
1255 |
> |
from, RPL_STATSDEBUG, to, dlink_list_length(&serv_list)); |
1256 |
|
sendto_one(source_p, ":%s %d %s ? :Sent total : %7.2f %s", |
1257 |
|
from, RPL_STATSDEBUG, to, |
1258 |
< |
_GMKv((signed)sendB), _GMKs((signed)sendB)); |
1258 |
> |
_GMKv(sendB), _GMKs(sendB)); |
1259 |
|
sendto_one(source_p, ":%s %d %s ? :Recv total : %7.2f %s", |
1260 |
|
from, RPL_STATSDEBUG, to, |
1261 |
< |
_GMKv((signed)recvB), _GMKs((signed)recvB)); |
1261 |
> |
_GMKv(recvB), _GMKs(recvB)); |
1262 |
|
|
1263 |
|
uptime = (CurrentTime - me.since); |
1264 |
|
|
1265 |
|
sendto_one(source_p, ":%s %d %s ? :Server send: %7.2f %s (%4.1f K/s)", |
1266 |
|
from, RPL_STATSDEBUG, to, |
1267 |
< |
_GMKv((signed)(me.localClient->send.bytes>>10)), |
1268 |
< |
_GMKs((signed)(me.localClient->send.bytes>>10)), |
1269 |
< |
(float)((float)(((signed)me.localClient->send.bytes) >> 10) / |
1270 |
< |
(float)uptime)); |
1267 |
> |
_GMKv((me.localClient->send.bytes>>10)), |
1268 |
> |
_GMKs((me.localClient->send.bytes>>10)), |
1269 |
> |
(float)((float)((me.localClient->send.bytes) >> 10) / |
1270 |
> |
(float)uptime)); |
1271 |
|
sendto_one(source_p, ":%s %d %s ? :Server recv: %7.2f %s (%4.1f K/s)", |
1272 |
|
from, RPL_STATSDEBUG, to, |
1273 |
< |
_GMKv((signed)(me.localClient->recv.bytes>>10)), |
1274 |
< |
_GMKs((signed)(me.localClient->recv.bytes>>10)), |
1275 |
< |
(float)((float)(((signed)me.localClient->recv.bytes) >> 10) / |
1276 |
< |
(float)uptime)); |
1273 |
> |
_GMKv((me.localClient->recv.bytes>>10)), |
1274 |
> |
_GMKs((me.localClient->recv.bytes>>10)), |
1275 |
> |
(float)((float)((me.localClient->recv.bytes) >> 10) / |
1276 |
> |
(float)uptime)); |
1277 |
|
} |
1278 |
|
|
1279 |
|
static void |