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 8310 by michael, Wed Feb 28 16:46:13 2018 UTC vs.
Revision 8715 by michael, Sun Dec 9 20:17:02 2018 UTC

# Line 39 | Line 39
39   #include "memory.h"
40   #include "user.h"
41   #include "server.h"
42 + #include "packet.h"
43  
44  
45   /*
# Line 176 | Line 177 | parse_handle_numeric(unsigned int numeri
177    else
178      target_p = find_person(source_p, parv[1]);
179  
180 <  if ((!target_p || target_p->from == source_p->from) && !chptr)
180 >  if ((target_p == NULL || target_p->from == source_p->from) && chptr == NULL)
181      return;
182  
183    /*
# Line 221 | Line 222 | parse_handle_command(struct Message *mes
222   {
223    if (IsServer(source_p->from))
224      ++message->rcount;
224 –
225    ++message->count;
226  
227 +  if (MyClient(source_p) && (message->flags & MFLG_ENDGRACE))
228 +    flood_endgrace(source_p);
229 +
230    /* Check right amount of parameters is passed... --is */
231    if (i < message->args_min)
232      sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, message->cmd);
# Line 251 | Line 254 | parse(struct Client *client_p, char *pbu
254    if (IsDefunct(client_p))
255      return;
256  
257 <  assert(client_p->connection->fd.flags.open);
257 >  assert(client_p->connection);
258 >  assert(client_p->connection->fd);
259 >  assert(client_p->connection->fd->flags.open);
260 >
261 >
262    assert((bufend - pbuffer) < IRCD_BUFSIZE);
263  
264    for (ch = pbuffer; *ch == ' '; ++ch)  /* Skip spaces */
# Line 389 | Line 396 | parse(struct Client *client_p, char *pbu
396      if (paramcount > MAXPARA)
397        paramcount = MAXPARA;
398  
399 <    while (1)
399 >    while (true)
400      {
401         while (*s == ' ')
402           *s++ = '\0';
# Line 400 | Line 407 | parse(struct Client *client_p, char *pbu
407         if (*s == ':')
408         {
409           /* The rest is single parameter--can include blanks also. */
410 <         para[++parc] = s + (!numeric);  /* Keep the colon if it's a numeric */
410 >         para[++parc] = s + (numeric == 0);  /* Keep the colon if it's a numeric */
411           break;
412         }
413  
# Line 561 | Line 568 | mod_add_cmd(struct Message *msg)
568    assert(msg->cmd);
569  
570    /* Command already added? */
571 <  if (msg_tree_parse(msg->cmd))
572 <    return;
566 <
567 <  add_msg_element(&msg_tree, msg, msg->cmd);
571 >  if (msg_tree_parse(msg->cmd) == NULL)
572 >    add_msg_element(&msg_tree, msg, msg->cmd);
573   }
574  
575   /* mod_del_cmd()
# Line 579 | Line 584 | mod_del_cmd(struct Message *msg)
584    assert(msg);
585    assert(msg->cmd);
586  
587 <  if (!msg_tree_parse(msg->cmd))
588 <    return;
584 <
585 <  del_msg_element(&msg_tree, msg->cmd);
587 >  if (msg_tree_parse(msg->cmd))
588 >    del_msg_element(&msg_tree, msg->cmd);
589   }
590  
591   /* find_command()

Diff Legend

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