ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_stats.c
(Generate patch)

Comparing ircd-hybrid-8/modules/m_stats.c (file contents):
Revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC vs.
Revision 1241 by michael, Thu Sep 29 20:26:09 2011 UTC

# Line 329 | Line 329 | send_usage(struct Client *source_p)
329    if (secs == 0)
330      secs = 1;
331  
332 <  rup = (CurrentTime - me.since) * hzz;
332 >  rup = (CurrentTime - me.localClient->since) * hzz;
333  
334    if (rup == 0)
335      rup = 1;
# Line 1132 | Line 1132 | stats_tstats(struct Client *source_p)
1132  
1133      sp->is_sbs += target_p->localClient->send.bytes;
1134      sp->is_sbr += target_p->localClient->recv.bytes;
1135 <    sp->is_sti += CurrentTime - target_p->firsttime;
1135 >    sp->is_sti += CurrentTime - target_p->localClient->firsttime;
1136    }
1137  
1138    sp->is_cl += dlink_list_length(&local_client_list);
# Line 1143 | Line 1143 | stats_tstats(struct Client *source_p)
1143  
1144      sp->is_cbs += target_p->localClient->send.bytes;
1145      sp->is_cbr += target_p->localClient->recv.bytes;
1146 <    sp->is_cti += CurrentTime - target_p->firsttime;
1146 >    sp->is_cti += CurrentTime - target_p->localClient->firsttime;
1147    }
1148  
1149    sp->is_ni += dlink_list_length(&unknown_list);
# Line 1182 | Line 1182 | stats_tstats(struct Client *source_p)
1182   static void
1183   stats_uptime(struct Client *source_p)
1184   {
1185 <  time_t now = CurrentTime - me.since;
1185 >  time_t now = CurrentTime - me.localClient->since;
1186  
1187    sendto_one(source_p, form_str(RPL_STATSUPTIME), from, to,
1188               now / 86400, (now / 3600) % 24, (now / 60) % 60, now % 60);
# Line 1216 | Line 1216 | stats_servers(struct Client *source_p)
1216      sendto_one(source_p, ":%s %d %s v :%s (%s!%s@%s) Idle: %d",
1217                 from, RPL_STATSDEBUG, to, target_p->name,
1218                 (target_p->serv->by[0] ? target_p->serv->by : "Remote."),
1219 <               "*", "*", (int)(CurrentTime - target_p->lasttime));
1219 >               "*", "*", (int)(CurrentTime - target_p->localClient->lasttime));
1220    }
1221  
1222    sendto_one(source_p, ":%s %d %s v :%u Server(s)",
# Line 1306 | Line 1306 | stats_servlinks(struct Client *source_p)
1306                 target_p->localClient->send.bytes >> 10,
1307                 target_p->localClient->recv.messages,
1308                 target_p->localClient->recv.bytes >> 10,
1309 <               (unsigned)(CurrentTime - target_p->firsttime),
1310 <               (CurrentTime > target_p->since) ? (unsigned)(CurrentTime - target_p->since): 0,
1309 >               (unsigned)(CurrentTime - target_p->localClient->firsttime),
1310 >               (CurrentTime > target_p->localClient->since) ? (unsigned)(CurrentTime - target_p->localClient->since): 0,
1311                 HasUMode(source_p, UMODE_OPER) ? show_capabilities(target_p) : "TS");
1312    }
1313  
# Line 1323 | Line 1323 | stats_servlinks(struct Client *source_p)
1323               from, RPL_STATSDEBUG, to,
1324               _GMKv(recvB), _GMKs(recvB));
1325  
1326 <  uptime = (CurrentTime - me.since);
1326 >  uptime = (CurrentTime - me.localClient->since);
1327  
1328    sendto_one(source_p, ":%s %d %s ? :Server send: %7.2f %s (%4.1f K/s)",
1329               from, RPL_STATSDEBUG, to,
# Line 1419 | Line 1419 | stats_L_list(struct Client *source_p,cha
1419                   target_p->localClient->send.bytes>>10,
1420                   target_p->localClient->recv.messages,
1421                   target_p->localClient->recv.bytes>>10,
1422 <                 (unsigned)(CurrentTime - target_p->firsttime),
1423 <                 (CurrentTime > target_p->since) ? (unsigned)(CurrentTime - target_p->since):0,
1422 >                 (unsigned)(CurrentTime - target_p->localClient->firsttime),
1423 >                 (CurrentTime > target_p->localClient->since) ? (unsigned)(CurrentTime - target_p->localClient->since):0,
1424                   IsServer(target_p) ? show_capabilities(target_p) : "-");
1425      }
1426      else
# Line 1436 | Line 1436 | stats_L_list(struct Client *source_p,cha
1436                     target_p->localClient->send.bytes>>10,
1437                     target_p->localClient->recv.messages,
1438                     target_p->localClient->recv.bytes>>10,
1439 <                   (unsigned)(CurrentTime - target_p->firsttime),
1440 <                   (CurrentTime > target_p->since) ? (unsigned)(CurrentTime - target_p->since):0,
1439 >                   (unsigned)(CurrentTime - target_p->localClient->firsttime),
1440 >                   (CurrentTime > target_p->localClient->since) ? (unsigned)(CurrentTime - target_p->localClient->since):0,
1441                     IsServer(target_p) ? show_capabilities(target_p) : "-");
1442        else /* show the real IP */
1443          sendto_one(source_p, form_str(RPL_STATSLINKINFO),
# Line 1450 | Line 1450 | stats_L_list(struct Client *source_p,cha
1450                     target_p->localClient->send.bytes>>10,
1451                     target_p->localClient->recv.messages,
1452                     target_p->localClient->recv.bytes>>10,
1453 <                   (unsigned)(CurrentTime - target_p->firsttime),
1454 <                   (CurrentTime > target_p->since) ? (unsigned)(CurrentTime - target_p->since):0,
1453 >                   (unsigned)(CurrentTime - target_p->localClient->firsttime),
1454 >                   (CurrentTime > target_p->localClient->since) ? (unsigned)(CurrentTime - target_p->localClient->since):0,
1455                     IsServer(target_p) ? show_capabilities(target_p) : "-");
1456      }
1457    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines