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 4926 by michael, Tue Nov 25 16:43:49 2014 UTC vs.
Revision 4959 by michael, Sun Nov 30 17:23:06 2014 UTC

# Line 175 | Line 175 | parse_handle_numeric(unsigned int numeri
175    else
176      target_p = find_person(source_p, parv[1]);
177  
178 <  if (((!target_p) || (target_p->from == source_p->from)) && !chptr)
178 >  if ((!target_p || target_p->from == source_p->from) && !chptr)
179      return;
180  
181    /*
# Line 215 | Line 215 | parse_handle_numeric(unsigned int numeri
215   * side effects -
216   */
217   static void
218 < parse_handle_command(struct Message *mptr, struct Client *source_p,
218 > parse_handle_command(struct Message *message, struct Client *source_p,
219                       unsigned int i, char *para[])
220   {
221    if (IsServer(source_p->from))
222 <    ++mptr->rcount;
222 >    ++message->rcount;
223  
224 <  ++mptr->count;
224 >  ++message->count;
225  
226    /* Check right amount of parameters is passed... --is */
227 <  if (i < mptr->args_min)
228 <    sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, mptr->cmd);
227 >  if (i < message->args_min)
228 >    sendto_one_numeric(source_p, &me, ERR_NEEDMOREPARAMS, message->cmd);
229    else
230 <    mptr->handlers[source_p->from->handler](source_p, i, para);
230 >    message->handlers[source_p->from->handler](source_p, i, para);
231   }
232  
233   /*
# Line 239 | Line 239 | void
239   parse(struct Client *client_p, char *pbuffer, char *bufend)
240   {
241    struct Client *from = client_p;
242 <  struct Message *msg_ptr = NULL;
242 >  struct Message *message = NULL;
243    char *para[MAXPARA + 2];  /* <command> + <parameters> + NULL */
244    char *ch = NULL;
245    char *s = NULL;
# Line 295 | Line 295 | parse(struct Client *client_p, char *pbu
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",
298 >                             "Fake direction: dropped message from %s[%s] via %s",
299                               from->name, from->from->name,
300                               get_client_name(client_p, MASK_IP));
301          return;
# Line 337 | Line 337 | parse(struct Client *client_p, char *pbu
337      if ((s = strchr(ch, ' ')))
338        *s++ = '\0';
339  
340 <    if ((msg_ptr = find_command(ch)) == NULL)
340 >    if ((message = find_command(ch)) == NULL)
341      {
342        /*
343         * Note: Give error message *only* to recognized
# Line 358 | Line 358 | parse(struct Client *client_p, char *pbu
358        return;
359      }
360  
361 <    assert(msg_ptr->cmd);
361 >    assert(message->cmd);
362  
363 <    paramcount = msg_ptr->args_max;
363 >    paramcount = message->args_max;
364      length = bufend - ((s) ? s : ch);
365 <    msg_ptr->bytes += length;
365 >    message->bytes += length;
366    }
367  
368    /*
# Line 376 | Line 376 | parse(struct Client *client_p, char *pbu
376  
377    para[parc] = ch;
378  
379 <  if (msg_ptr && (msg_ptr->flags & MFLG_EXTRA))
379 >  if (message && (message->flags & MFLG_EXTRA))
380    {
381      /*
382       * XXX: This will have to go away after the command handler rewrite
383       */
384 <    para[++parc] = msg_ptr->extra;
384 >    para[++parc] = message->extra;
385    }
386  
387    if (s)
# Line 416 | Line 416 | parse(struct Client *client_p, char *pbu
416  
417    para[++parc] = NULL;
418  
419 <  if (msg_ptr)
420 <    parse_handle_command(msg_ptr, from, parc, para);
419 >  if (message)
420 >    parse_handle_command(message, from, parc, para);
421    else
422      parse_handle_numeric(numeric, from, parc, para);
423   }

Diff Legend

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