/[svn]/ircd-hybrid/contrib/m_ojoin.c
ViewVC logotype

Diff of /ircd-hybrid/contrib/m_ojoin.c

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

revision 537 by adx, Sat Feb 11 23:37:10 2006 UTC revision 538 by michael, Fri Mar 24 09:46:02 2006 UTC
# Line 69  mo_ojoin(struct Client *client_p, struct Line 69  mo_ojoin(struct Client *client_p, struct
69    unsigned int flags = 0;    unsigned int flags = 0;
70    dlink_node *ptr;    dlink_node *ptr;
71    
   /* admins only */  
72    if (!IsAdmin(source_p))    if (!IsAdmin(source_p))
73    {    {
74      sendto_one(source_p, form_str(ERR_NOPRIVILEGES),      sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
# Line 117  mo_ojoin(struct Client *client_p, struct Line 116  mo_ojoin(struct Client *client_p, struct
116    
117      /* Error checking here */      /* Error checking here */
118      if ((chptr = hash_find_channel(name)) == NULL)      if ((chptr = hash_find_channel(name)) == NULL)
     {  
119        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),        sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
120                   me.name, source_p->name, name);                   me.name, source_p->name, name);
     }  
121      else if (IsMember(source_p, chptr))      else if (IsMember(source_p, chptr))
     {  
122        sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",        sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
123                   me.name, source_p->name, name);                   me.name, source_p->name, chptr->chname);
     }  
124      else      else
125      {      {
126        add_user_to_channel(chptr, source_p, flags, NO);        add_user_to_channel(chptr, source_p, flags, NO);
# Line 135  mo_ojoin(struct Client *client_p, struct Line 130  mo_ojoin(struct Client *client_p, struct
130          DLINK_FOREACH(ptr, serv_list.head)          DLINK_FOREACH(ptr, serv_list.head)
131          {          {
132            struct Client *serv_p = ptr->data;            struct Client *serv_p = ptr->data;
           if (IsDead(serv_p))  
             continue;  
133    
134            sendto_one(serv_p, ":%s SJOIN %lu %s + :%s%s", ID_or_name(&me, serv_p),            sendto_one(serv_p, ":%s SJOIN %lu %s + :%s%s", ID_or_name(&me, serv_p),
135                       (unsigned long)chptr->channelts, chptr->chname,                       (unsigned long)chptr->channelts, chptr->chname,
# Line 147  mo_ojoin(struct Client *client_p, struct Line 140  mo_ojoin(struct Client *client_p, struct
140    
141        sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s!%s@%s JOIN %s",        sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s!%s@%s JOIN %s",
142                             source_p->name, source_p->username,                             source_p->name, source_p->username,
143                             source_p->host,                             source_p->host, chptr->chname);
                            chptr->chname);  
144    
145        if (modeletter != '\0')        if (modeletter != '\0')
146          sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s MODE %s +%c %s",          sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s MODE %s +%c %s",

Legend:
Removed from v.537  
changed lines
  Added in v.538

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