/[svn]/ircd-hybrid/trunk/modules/m_stats.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/modules/m_stats.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9557 by michael, Thu May 14 19:26:52 2020 UTC revision 9558 by michael, Sun Aug 2 05:18:27 2020 UTC
# Line 1059  stats_servlinks(struct Client *source_p, Line 1059  stats_servlinks(struct Client *source_p,
1059    dlink_node *node;    dlink_node *node;
1060    uintmax_t sendB = 0, recvB = 0;    uintmax_t sendB = 0, recvB = 0;
1061    
   if (ConfigServerHide.flatten_links && !HasUMode(source_p, UMODE_OPER))  
   {  
     sendto_one_numeric(source_p, &me, ERR_NOPRIVILEGES);  
     return;  
   }  
   
1062    DLINK_FOREACH(node, local_server_list.head)    DLINK_FOREACH(node, local_server_list.head)
1063    {    {
1064      const struct Client *target_p = node->data;      const struct Client *target_p = node->data;
1065    
     if (HasFlag(target_p, FLAGS_SERVICE) && ConfigServerHide.hide_services)  
       if (!HasUMode(source_p, UMODE_OPER))  
         continue;  
   
1066      sendB += target_p->connection->send.bytes;      sendB += target_p->connection->send.bytes;
1067      recvB += target_p->connection->recv.bytes;      recvB += target_p->connection->recv.bytes;
1068    
# Line 1086  stats_servlinks(struct Client *source_p, Line 1076  stats_servlinks(struct Client *source_p,
1076                 target_p->connection->recv.bytes >> 10,                 target_p->connection->recv.bytes >> 10,
1077                 (event_base->time.sec_monotonic - target_p->connection->created_monotonic),                 (event_base->time.sec_monotonic - target_p->connection->created_monotonic),
1078                 (event_base->time.sec_monotonic - target_p->connection->last_data),                 (event_base->time.sec_monotonic - target_p->connection->last_data),
1079                 HasUMode(source_p, UMODE_OPER) ? capab_get(target_p) : "TS");                 capab_get(target_p));
1080    }    }
1081    
1082    sendB >>= 10;    sendB >>= 10;
# Line 1099  stats_servlinks(struct Client *source_p, Line 1089  stats_servlinks(struct Client *source_p,
1089    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT, "? :Recv total: %7.2f %s",    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT, "? :Recv total: %7.2f %s",
1090                       _GMKv(recvB), _GMKs(recvB));                       _GMKv(recvB), _GMKs(recvB));
1091    
1092    uintmax_t uptime = (event_base->time.sec_monotonic - me.connection->created_monotonic);    const uintmax_t uptime = (event_base->time.sec_monotonic - me.connection->created_monotonic);
1093    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
1094                       "? :Server send: %7.2f %s (%4.1f KiB/s)",                       "? :Server send: %7.2f %s (%4.1f KiB/s)",
1095                       _GMKv((me.connection->send.bytes >> 10)),                       _GMKv((me.connection->send.bytes >> 10)),
# Line 1270  static const struct StatsStruct  stats_t Line 1260  static const struct StatsStruct  stats_t
1260    { .letter = 'y', .handler = stats_class, .required_modes = UMODE_OPER },    { .letter = 'y', .handler = stats_class, .required_modes = UMODE_OPER },
1261    { .letter = 'Y', .handler = stats_class, .required_modes = UMODE_OPER },    { .letter = 'Y', .handler = stats_class, .required_modes = UMODE_OPER },
1262    { .letter = 'z', .handler = stats_memory, .required_modes = UMODE_OPER },    { .letter = 'z', .handler = stats_memory, .required_modes = UMODE_OPER },
1263    { .letter = '?', .handler = stats_servlinks },    { .letter = '?', .handler = stats_servlinks, .required_modes = UMODE_OPER },
1264    { .letter = '\0' }    { .letter = '\0' }
1265  };  };
1266    

Legend:
Removed from v.9557  
changed lines
  Added in v.9558

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28