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

Comparing ircd-hybrid/trunk/src/parse.c (file contents):
Revision 4556 by michael, Sat Aug 23 17:21:17 2014 UTC vs.
Revision 4926 by michael, Tue Nov 25 16:43:49 2014 UTC

# Line 15 | Line 15
15   *
16   *  You should have received a copy of the GNU General Public License
17   *  along with this program; if not, write to the Free Software
18 < *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
18 > *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19   *  USA
20   */
21  
# Line 130 | Line 130 | parse_remove_unknown(struct Client *clie
130                 me.id, lsender, me.name);
131   }
132  
133 – /* cancel_clients()
134 – *
135 – * inputs       -
136 – * output       -
137 – * side effects -
138 – */
139 – static void
140 – parse_cancel_clients(struct Client *client_p, struct Client *source_p, char *cmd)
141 – {
142 –  if (IsServer(source_p) || IsMe(source_p))
143 –  {
144 –    sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
145 –                         "Message for %s[%s] from %s",
146 –                         source_p->name, source_p->from->name,
147 –                         get_client_name(client_p, SHOW_IP));
148 –    sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
149 –                         "Message for %s[%s] from %s",
150 –                         source_p->name, source_p->from->name,
151 –                         get_client_name(client_p, MASK_IP));
152 –    sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
153 –                         "Not dropping server %s (%s) for Fake Direction",
154 –                         client_p->name, source_p->name);
155 –    return;
156 –  }
157 –
158 –  sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
159 –                       "Message for %s[%s@%s!%s] from %s (TS, ignored)",
160 –                       source_p->name, source_p->username, source_p->host,
161 –                       source_p->from->name, get_client_name(client_p, SHOW_IP));
162 –  sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
163 –                       "Message for %s[%s@%s!%s] from %s (TS, ignored)",
164 –                       source_p->name, source_p->username, source_p->host,
165 –                       source_p->from->name, get_client_name(client_p, MASK_IP));
166 – }
167 –
133   /*
134   *
135   *      parc    number of arguments ('sender' counted as one!)
# Line 236 | Line 201 | parse_handle_numeric(unsigned int numeri
201    }
202    else
203      sendto_channel_butone(source_p, source_p, chptr, 0, "%u %s %s",
204 <                          numeric, chptr->chname, parv[2]);
204 >                          numeric, chptr->name, parv[2]);
205   }
206  
207   /* handle_command()
# Line 285 | Line 250 | parse(struct Client *client_p, char *pbu
250    if (IsDefunct(client_p))
251      return;
252  
253 <  assert(client_p->localClient->fd.flags.open);
253 >  assert(client_p->connection->fd.flags.open);
254    assert((bufend - pbuffer) < IRCD_BUFSIZE);
255  
256    for (ch = pbuffer; *ch == ' '; ++ch)  /* Skip spaces */
# Line 297 | Line 262 | parse(struct Client *client_p, char *pbu
262       * Copy the prefix to 'sender' assuming it terminates
263       * with SPACE (or NULL, which is an error, though).
264       */
265 <    const char *sender = ++ch;
265 >    const char *const sender = ++ch;
266  
267      if ((s = strchr(ch, ' ')))
268      {
# Line 325 | Line 290 | parse(struct Client *client_p, char *pbu
290        if (from->from != client_p)
291        {
292          ++ServerStats.is_wrdi;
293 <        parse_cancel_clients(client_p, from, pbuffer);
293 >        sendto_realops_flags(UMODE_DEBUG, L_ADMIN, SEND_NOTICE,
294 >                             "Fake direction: dropped message from %s[%s] via %s",
295 >                             from->name, from->from->name,
296 >                             get_client_name(client_p, SHOW_IP));
297 >        sendto_realops_flags(UMODE_DEBUG, L_OPER, SEND_NOTICE,
298 >                             "Fake direction: dropped message fro %s[%s] via %s",
299 >                             from->name, from->from->name,
300 >                             get_client_name(client_p, MASK_IP));
301          return;
302        }
303      }
# Line 360 | Line 332 | parse(struct Client *client_p, char *pbu
332    }
333    else
334    {
335 <    unsigned int ii = 0;
335 >    unsigned int length = 0;
336  
337      if ((s = strchr(ch, ' ')))
338        *s++ = '\0';
# Line 389 | Line 361 | parse(struct Client *client_p, char *pbu
361      assert(msg_ptr->cmd);
362  
363      paramcount = msg_ptr->args_max;
364 <    ii = bufend - ((s) ? s : ch);
365 <    msg_ptr->bytes += ii;
364 >    length = bufend - ((s) ? s : ch);
365 >    msg_ptr->bytes += length;
366    }
367  
368    /*
# Line 427 | Line 399 | parse(struct Client *client_p, char *pbu
399  
400         if (*s == ':')
401         {
402 <         /* The rest is a single parameter */
402 >         /* The rest is single parameter--can include blanks also. */
403           para[++parc] = s + (!numeric);  /* Keep the colon if it's a numeric */
404           break;
405         }
# Line 646 | Line 618 | recurse_report_messages(struct Client *s
618   void
619   report_messages(struct Client *source_p)
620   {
621 <  const struct MessageTree *mtree = &msg_tree;
621 >  const struct MessageTree *const mtree = &msg_tree;
622  
623    for (unsigned int i = 0; i < MAXPTRLEN; ++i)
624      if (mtree->pointers[i])

Diff Legend

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