/[svn]/ircd-hybrid-8/src/parse.c
ViewVC logotype

Diff of /ircd-hybrid-8/src/parse.c

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

revision 1569 by michael, Tue Oct 16 18:46:53 2012 UTC revision 1570 by michael, Tue Oct 16 19:37:24 2012 UTC
# Line 317  handle_command(struct Message *mptr, str Line 317  handle_command(struct Message *mptr, str
317    {    {
318      if (!IsServer(client_p))      if (!IsServer(client_p))
319      {      {
320        sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS),        sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS), me.name,
321                     me.name, EmptyString(hpara[0]) ? "*" : hpara[0], mptr->cmd);                   EmptyString(hpara[0]) ? "*" : hpara[0], mptr->cmd);
322      }      }
323      else      else
324      {      {
# Line 357  handle_command(struct Message *mptr, str Line 357  handle_command(struct Message *mptr, str
357   * in the parent.   * in the parent.
358   */   */
359  static void  static void
360  add_msg_element(struct MessageTree *mtree_p,  add_msg_element(struct MessageTree *mtree_p, struct Message *msg_p,
361                  struct Message *msg_p, const char *cmd)                  const char *cmd)
362  {  {
363    struct MessageTree *ntree_p;    struct MessageTree *ntree_p;
364    
365    if (*cmd == '\0')    if (*cmd == '\0')
366    {    {
367      mtree_p->msg = msg_p;      mtree_p->msg = msg_p;
368      mtree_p->links++;           /* Have msg pointer, so up ref count */      mtree_p->links++;  /* Have msg pointer, so up ref count */
369    }    }
370    else    else
371    {    {
# Line 380  add_msg_element(struct MessageTree *mtre Line 380  add_msg_element(struct MessageTree *mtre
380        ntree_p = MyMalloc(sizeof(struct MessageTree));        ntree_p = MyMalloc(sizeof(struct MessageTree));
381        mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = ntree_p;        mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = ntree_p;
382    
383        mtree_p->links++;         /* Have new pointer, so up ref count */        mtree_p->links++;  /* Have new pointer, so up ref count */
384      }      }
385    
386      add_msg_element(ntree_p, msg_p, cmd + 1);      add_msg_element(ntree_p, msg_p, cmd + 1);
# Line 433  del_msg_element(struct MessageTree *mtre Line 433  del_msg_element(struct MessageTree *mtre
433    
434        if (ntree_p->links == 0)        if (ntree_p->links == 0)
435        {        {
436          mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = NULL;          mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = NULL;
437          mtree_p->links--;          mtree_p->links--;
438          MyFree(ntree_p);          MyFree(ntree_p);
439        }        }
440      }      }
441    }    }
# Line 717  handle_numeric(char numeric[], struct Cl Line 717  handle_numeric(char numeric[], struct Cl
717    
718        if ((num != ERR_NOSUCHNICK))        if ((num != ERR_NOSUCHNICK))
719          sendto_realops_flags(UMODE_ALL, L_ADMIN,          sendto_realops_flags(UMODE_ALL, L_ADMIN,
720                               "*** %s(via %s) sent a %s numeric to me: %s",                               "*** %s(via %s) sent a %s numeric to me: %s",
721                               source_p->name, client_p->name, numeric, buffer);                               source_p->name, client_p->name, numeric, buffer);
722        return;        return;
723      }      }
724      else if (target_p->from == client_p)      else if (target_p->from == client_p)
# Line 743  handle_numeric(char numeric[], struct Cl Line 743  handle_numeric(char numeric[], struct Cl
743      return;      return;
744    }    }
745    else if ((chptr = hash_find_channel(parv[1])) != NULL)    else if ((chptr = hash_find_channel(parv[1])) != NULL)
746      sendto_channel_local(ALL_MEMBERS, 0, chptr,      sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s %s %s %s",
747                           ":%s %s %s %s",                           source_p->name,
748                           source_p->name,                           numeric, chptr->chname, buffer);
                          numeric, chptr->chname, buffer);  
749  }  }
750    
751  /* m_not_oper()  /* m_not_oper()

Legend:
Removed from v.1569  
changed lines
  Added in v.1570

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