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

Comparing ircd-hybrid-7.2/src/parse.c (file contents):
Revision 753 by adx, Wed Jul 26 15:58:16 2006 UTC vs.
Revision 896 by michael, Sat Nov 3 08:54:09 2007 UTC

# Line 34 | Line 34
34   #include "ircd.h"
35   #include "numeric.h"
36   #include "s_log.h"
37 #include "s_stats.h"
37   #include "send.h"
38   #include "ircd_handler.h"
39   #include "msg.h"
# Line 245 | Line 244 | parse(struct Client *client_p, char *pbu
244         */
245        if (from == NULL)
246        {
247 <        ServerStats->is_unpf++;
247 >        ++ServerStats.is_unpf;
248          remove_unknown(client_p, sender, pbuffer);
249          return;
250        }
# Line 254 | Line 253 | parse(struct Client *client_p, char *pbu
253  
254        if (from->from != client_p)
255        {
256 <        ServerStats->is_wrdi++;
256 >        ++ServerStats.is_wrdi;
257          cancel_clients(client_p, from, pbuffer);
258          return;
259        }
# Line 266 | Line 265 | parse(struct Client *client_p, char *pbu
265  
266    if (*ch == '\0')
267    {
268 <    ServerStats->is_empt++;
268 >    ++ServerStats.is_empt;
269      return;
270    }
271  
# Line 284 | Line 283 | parse(struct Client *client_p, char *pbu
283      mptr = NULL;
284      numeric = ch;
285      paramcount = MAXPARA;
286 <    ServerStats->is_num++;
286 >    ++ServerStats.is_num;
287      s = ch + 3;  /* I know this is ' ' from above if            */
288      *s++ = '\0'; /* blow away the ' ', and point s to next part */
289    }
# Line 314 | Line 313 | parse(struct Client *client_p, char *pbu
313                       me.name, from->name, ch);
314        }
315  
316 <      ServerStats->is_unco++;
316 >      ++ServerStats.is_unco;
317        return;
318      }
319  
# Line 459 | Line 458 | add_msg_element(struct MessageTree *mtre
458  
459        mtree_p->links++;         /* Have new pointer, so up ref count */
460      }
461 +
462      add_msg_element(ntree_p, msg_p, cmd+1);
463    }
464   }
# Line 506 | Line 506 | del_msg_element(struct MessageTree *mtre
506      if ((ntree_p = mtree_p->pointers[*cmd & (MAXPTRLEN-1)]) != NULL)
507      {
508        del_msg_element(ntree_p, cmd+1);
509 +
510        if (ntree_p->links == 0)
511        {
512          mtree_p->pointers[*cmd & (MAXPTRLEN-1)] = NULL;
# Line 589 | Line 590 | mod_del_cmd(struct Message *msg)
590   struct Message *
591   find_command(const char *cmd)
592   {
593 <  return(msg_tree_parse(cmd, &msg_tree));
593 >  return msg_tree_parse(cmd, &msg_tree);
594   }
595  
596   /* report_messages()
# Line 605 | Line 606 | report_messages(struct Client *source_p)
606    int i;
607  
608    for (i = 0; i < MAXPTRLEN; i++)
608  {
609      if (mtree->pointers[i] != NULL)
610        recurse_report_messages(source_p, mtree->pointers[i]);
611  }
611   }
612  
613   static void
# Line 617 | Line 616 | recurse_report_messages(struct Client *s
616    int i;
617  
618    if (mtree->msg != NULL)
620  {
619      sendto_one(source_p, form_str(RPL_STATSCOMMANDS),
620                 me.name, source_p->name, mtree->msg->cmd,
621                 mtree->msg->count, mtree->msg->bytes,
622                 mtree->msg->rcount);
625  }
623  
624    for (i = 0; i < MAXPTRLEN; i++)
628  {
625      if (mtree->pointers[i] != NULL)
626        recurse_report_messages(source_p, mtree->pointers[i]);
631  }
627   }
628  
629   /* cancel_clients()
# Line 671 | Line 666 | cancel_clients(struct Client *client_p,
666      sendto_realops_flags(UMODE_DEBUG, L_ALL,
667                           "Not dropping server %s (%s) for Fake Direction",
668                           client_p->name, source_p->name);
669 <    return(-1);
669 >    return -1;
670      /* return exit_client(client_p, client_p, &me, "Fake Direction");*/
671    }
672  
# Line 693 | Line 688 | cancel_clients(struct Client *client_p,
688                         source_p->name, source_p->username, source_p->host,
689                         source_p->from->name, get_client_name(client_p, MASK_IP));
690  
691 <  return(0);
691 >  return 0;
692   }
693  
694   /* remove_unknown()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines