/[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 2340 by michael, Wed Jun 19 11:57:38 2013 UTC revision 2341 by michael, Wed Jul 3 13:54:23 2013 UTC
# Line 1637  m_stats(struct Client *client_p, struct Line 1637  m_stats(struct Client *client_p, struct
1637  {  {
1638    static time_t last_used = 0;    static time_t last_used = 0;
1639    
   /* Is the stats meant for us? */  
   if (!ConfigServerHide.disable_remote_commands)  
     if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2,  
                     parc, parv) != HUNTED_ISME)  
       return;  
   
1640    if (!MyClient(source_p) && IsCapable(source_p->from, CAP_TS6) && HasID(source_p))    if (!MyClient(source_p) && IsCapable(source_p->from, CAP_TS6) && HasID(source_p))
1641    {    {
1642      from = me.id;      from = me.id;
# Line 1664  m_stats(struct Client *client_p, struct Line 1658  m_stats(struct Client *client_p, struct
1658    
1659    last_used = CurrentTime;    last_used = CurrentTime;
1660    
1661      /* Is the stats meant for us? */
1662      if (!ConfigServerHide.disable_remote_commands)
1663        if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2,
1664                        parc, parv) != HUNTED_ISME)
1665          return;
1666    
1667    do_stats(source_p, parc, parv);    do_stats(source_p, parc, parv);
1668  }  }
1669    
# Line 1698  mo_stats(struct Client *client_p, struct Line 1698  mo_stats(struct Client *client_p, struct
1698    do_stats(source_p, parc, parv);    do_stats(source_p, parc, parv);
1699  }  }
1700    
 /*  
  * ms_stats - STATS message handler  
  *      parv[0] = sender prefix  
  *      parv[1] = statistics selector (defaults to Message frequency)  
  *      parv[2] = server name (current server defaulted, if omitted)  
  */  
 static void  
 ms_stats(struct Client *client_p, struct Client *source_p,  
          int parc, char *parv[])  
 {  
   if (hunt_server(client_p, source_p, ":%s STATS %s :%s", 2,  
                   parc, parv) != HUNTED_ISME)  
     return;  
   
   if (IsClient(source_p))  
     mo_stats(client_p, source_p, parc, parv);  
 }  
   
1701  static struct Message stats_msgtab = {  static struct Message stats_msgtab = {
1702    "STATS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,    "STATS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
1703    { m_unregistered, m_stats, ms_stats, m_ignore, mo_stats, m_ignore }    { m_unregistered, m_stats, mo_stats, m_ignore, mo_stats, m_ignore }
1704  };  };
1705    
1706  static void  static void

Legend:
Removed from v.2340  
changed lines
  Added in v.2341

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