/[svn]/ircd-hybrid-8/modules/m_svinfo.c
ViewVC logotype

Diff of /ircd-hybrid-8/modules/m_svinfo.c

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

revision 1297 by michael, Sat Oct 1 07:54:24 2011 UTC revision 1298 by michael, Tue Feb 28 18:51:13 2012 UTC
# Line 59  ms_svinfo(struct Client *client_p, struc Line 59  ms_svinfo(struct Client *client_p, struc
59      return;      return;
60    
61    if (TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN)    if (TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN)
62      {    {
63        /*      /*
64         * a server with the wrong TS version connected; since we're       * a server with the wrong TS version connected; since we're
65         * TS_ONLY we can't fall back to the non-TS protocol so       * TS_ONLY we can't fall back to the non-TS protocol so
66         * we drop the link  -orabidoo       * we drop the link  -orabidoo
67         */       */
68        sendto_realops_flags(UMODE_ALL, L_ADMIN,      sendto_realops_flags(UMODE_ALL, L_ADMIN,
69              "Link %s dropped, wrong TS protocol version (%s,%s)",              "Link %s dropped, wrong TS protocol version (%s,%s)",
70              get_client_name(source_p, SHOW_IP), parv[1], parv[2]);              get_client_name(source_p, SHOW_IP), parv[1], parv[2]);
71        sendto_realops_flags(UMODE_ALL, L_OPER,      sendto_realops_flags(UMODE_ALL, L_OPER,
72                   "Link %s dropped, wrong TS protocol version (%s,%s)",                   "Link %s dropped, wrong TS protocol version (%s,%s)",
73                   get_client_name(source_p, MASK_IP), parv[1], parv[2]);                   get_client_name(source_p, MASK_IP), parv[1], parv[2]);
74        exit_client(source_p, source_p, "Incompatible TS version");      exit_client(source_p, source_p, "Incompatible TS version");
75        return;      return;
76      }    }
77    
78    /*    /*
79     * since we're here, might as well set CurrentTime while we're at it     * since we're here, might as well set CurrentTime while we're at it
# Line 83  ms_svinfo(struct Client *client_p, struc Line 83  ms_svinfo(struct Client *client_p, struc
83    deltat = abs(theirtime - CurrentTime);    deltat = abs(theirtime - CurrentTime);
84    
85    if (deltat > ConfigFileEntry.ts_max_delta)    if (deltat > ConfigFileEntry.ts_max_delta)
86      {    {
87        sendto_realops_flags(UMODE_ALL, L_ADMIN,      sendto_realops_flags(UMODE_ALL, L_ADMIN,
88            "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",            "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
89            get_client_name(source_p, SHOW_IP),            get_client_name(source_p, SHOW_IP),
90            (unsigned long) CurrentTime,            (unsigned long) CurrentTime,
91            (unsigned long) theirtime,            (unsigned long) theirtime,
92            (int) deltat);            (int) deltat);
93        sendto_realops_flags(UMODE_ALL, L_OPER,      sendto_realops_flags(UMODE_ALL, L_OPER,
94            "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",            "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
95             get_client_name(source_p, MASK_IP),             get_client_name(source_p, MASK_IP),
96             (unsigned long) CurrentTime,             (unsigned long) CurrentTime,
97             (unsigned long) theirtime,             (unsigned long) theirtime,
98             (int) deltat);             (int) deltat);
99        ilog(LOG_TYPE_IRCD,      ilog(LOG_TYPE_IRCD,
100            "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",           "Link %s dropped, excessive TS delta (my TS=%lu, their TS=%lu, delta=%d)",
101            get_client_name(source_p, SHOW_IP),           get_client_name(source_p, SHOW_IP),
102            (unsigned long) CurrentTime,           (unsigned long) CurrentTime,
103            (unsigned long) theirtime,           (unsigned long) theirtime,
104            (int) deltat);           (int) deltat);
105        exit_client(source_p, source_p, "Excessive TS delta");      exit_client(source_p, source_p, "Excessive TS delta");
106        return;      return;
107      }    }
108    
109    if (deltat > ConfigFileEntry.ts_warn_delta)    if (deltat > ConfigFileEntry.ts_warn_delta)
110      {      sendto_realops_flags(UMODE_ALL, L_ALL,
       sendto_realops_flags(UMODE_ALL, L_ALL,  
111                  "Link %s notable TS delta (my TS=%lu, their TS=%lu, delta=%d)",                  "Link %s notable TS delta (my TS=%lu, their TS=%lu, delta=%d)",
112                  source_p->name,                  source_p->name,
113                  (unsigned long) CurrentTime,                  (unsigned long) CurrentTime,
114                  (unsigned long) theirtime,                  (unsigned long) theirtime,
115                  (int) deltat);                  (int) deltat);
     }  
116  }  }
117    
118  static struct Message svinfo_msgtab = {  static struct Message svinfo_msgtab = {

Legend:
Removed from v.1297  
changed lines
  Added in v.1298

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