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

Comparing ircd-hybrid/trunk/src/hash.c (file contents):
Revision 4588 by michael, Tue Aug 26 15:59:07 2014 UTC vs.
Revision 4618 by michael, Sun Sep 7 13:01:09 2014 UTC

# Line 143 | Line 143 | hash_add_client(struct Client *client_p)
143   void
144   hash_add_channel(struct Channel *chptr)
145   {
146 <  unsigned int hashv = strhash(chptr->chname);
146 >  unsigned int hashv = strhash(chptr->name);
147  
148    chptr->hnextch = channelTable[hashv];
149    channelTable[hashv] = chptr;
# Line 270 | Line 270 | hash_del_userhost(struct UserHost *userh
270   void
271   hash_del_channel(struct Channel *chptr)
272   {
273 <  unsigned int hashv = strhash(chptr->chname);
273 >  unsigned int hashv = strhash(chptr->name);
274    struct Channel *tmp = channelTable[hashv];
275  
276    if (tmp)
# Line 405 | Line 405 | hash_find_channel(const char *name)
405  
406    if ((chptr = channelTable[hashv]))
407    {
408 <    if (irccmp(name, chptr->chname))
408 >    if (irccmp(name, chptr->name))
409      {
410        struct Channel *prev;
411  
412        while (prev = chptr, (chptr = chptr->hnextch))
413        {
414 <        if (!irccmp(name, chptr->chname))
414 >        if (!irccmp(name, chptr->name))
415          {
416            prev->hnextch = chptr->hnextch;
417            chptr->hnextch = channelTable[hashv];
# Line 736 | Line 736 | free_list_task(struct Client *source_p)
736   * side effects -
737   */
738   static int
739 < list_allow_channel(const char *chname, const struct ListTask *lt)
739 > list_allow_channel(const char *name, const struct ListTask *lt)
740   {
741    const dlink_node *ptr = NULL;
742  
743    DLINK_FOREACH(ptr, lt->show_mask.head)
744 <    if (match(ptr->data, chname) != 0)
744 >    if (match(ptr->data, name) != 0)
745        return 0;
746  
747    DLINK_FOREACH(ptr, lt->hide_mask.head)
748 <    if (match(ptr->data, chname) == 0)
748 >    if (match(ptr->data, name) == 0)
749        return 0;
750  
751    return 1;
# Line 783 | Line 783 | list_one_channel(struct Client *source_p
783    if (lt->topic[0] && match(lt->topic, chptr->topic))
784      return;
785  
786 <  if (!list_allow_channel(chptr->chname, lt))
786 >  if (!list_allow_channel(chptr->name, lt))
787      return;
788  
789    channel_modes(chptr, source_p, modebuf, parabuf);
# Line 793 | Line 793 | list_one_channel(struct Client *source_p
793    else
794      snprintf(listbuf, sizeof(listbuf), "[%s]",  modebuf);
795  
796 <  sendto_one_numeric(source_p, &me, RPL_LIST, chptr->chname,
796 >  sendto_one_numeric(source_p, &me, RPL_LIST, chptr->name,
797                       dlink_list_length(&chptr->members),
798                       listbuf, chptr->topic);
799   }

Diff Legend

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