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/trunk/modules/m_stats.c (file contents):
Revision 2160 by michael, Sun Jun 2 18:23:50 2013 UTC vs.
Revision 2297 by michael, Wed Jun 19 11:57:38 2013 UTC

# Line 219 | Line 219 | report_resv(struct Client *source_p)
219    dlink_node *ptr = NULL;
220    struct MaskItem *conf = NULL;
221  
222 <  DLINK_FOREACH(ptr, resv_channel_list.head)
222 >  DLINK_FOREACH(ptr, cresv_items.head)
223    {
224      conf = ptr->data;
225      sendto_one(source_p, form_str(RPL_STATSQLINE),
# Line 453 | Line 453 | stats_memory(struct Client *source_p, in
453    /* count up all classes */
454    class_count = dlink_list_length(class_get_list());
455  
456 <  count_whowas_memory(&wwu, &wwm);
456 >  whowas_count_memory(&wwu, &wwm);
457    watch_count_memory(&watch_list_headers, &watch_list_memory);
458  
459    sendto_one(source_p, ":%s %d %s z :WATCH headers %u(%llu) entries %d(%u)",
# Line 476 | Line 476 | stats_memory(struct Client *source_p, in
476  
477    sendto_one(source_p, ":%s %d %s z :Resv channels %u(%lu) nicks %u(%lu)",
478               me.name, RPL_STATSDEBUG, source_p->name,
479 <             dlink_list_length(&resv_channel_list),
480 <             dlink_list_length(&resv_channel_list) * sizeof(struct MaskItem),
479 >             dlink_list_length(&cresv_items),
480 >             dlink_list_length(&cresv_items) * sizeof(struct MaskItem),
481               dlink_list_length(&nresv_items),
482               dlink_list_length(&nresv_items) * sizeof(struct MaskItem));
483  
# Line 1236 | Line 1236 | stats_tstats(struct Client *source_p, in
1236   static void
1237   stats_uptime(struct Client *source_p, int parc, char *parv[])
1238   {
1239 <  time_t now = CurrentTime - me.localClient->since;
1239 >  if (!HasUMode(source_p, UMODE_OPER) && ConfigFileEntry.stats_u_oper_only)
1240 >    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
1241 >               from, to);
1242 >  else
1243 >  {
1244 >    time_t now = CurrentTime - me.localClient->since;
1245  
1246 <  sendto_one(source_p, form_str(RPL_STATSUPTIME), from, to,
1247 <             now / 86400, (now / 3600) % 24, (now / 60) % 60, now % 60);
1246 >    sendto_one(source_p, form_str(RPL_STATSUPTIME), from, to,
1247 >               now / 86400, (now / 3600) % 24, (now / 60) % 60, now % 60);
1248  
1249 <  if (!ConfigFileEntry.disable_remote || HasUMode(source_p, UMODE_OPER))
1250 <     sendto_one(source_p, form_str(RPL_STATSCONN), from, to,
1251 <                Count.max_loc_con, Count.max_loc_cli, Count.totalrestartcount);
1249 >    if (!ConfigServerHide.disable_remote_commands || HasUMode(source_p, UMODE_OPER))
1250 >       sendto_one(source_p, form_str(RPL_STATSCONN), from, to,
1251 >                  Count.max_loc_con, Count.max_loc_cli, Count.totalrestartcount);
1252 >  }
1253   }
1254  
1255   static void
# Line 1632 | Line 1638 | m_stats(struct Client *client_p, struct
1638    static time_t last_used = 0;
1639  
1640    /* Is the stats meant for us? */
1641 <  if (!ConfigFileEntry.disable_remote)
1641 >  if (!ConfigServerHide.disable_remote_commands)
1642      if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2,
1643                      parc, parv) != HUNTED_ISME)
1644        return;

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)