/[svn]/ircd-hybrid-8/modules/m_invite.c
ViewVC logotype

Diff of /ircd-hybrid-8/modules/m_invite.c

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

revision 1476 by michael, Sun Jul 22 15:20:31 2012 UTC revision 1477 by michael, Sun Jul 22 15:36:30 2012 UTC
# Line 88  m_invite(struct Client *client_p, struct Line 88  m_invite(struct Client *client_p, struct
88      return;      return;
89    }    }
90    
91    if ((chptr->mode.mode & (MODE_INVITEONLY | MODE_PRIVATE)))    if (MyConnect(source_p) && !has_member_flags(ms, CHFL_CHANOP))
92    {    {
93      if (MyConnect(source_p) && !has_member_flags(ms, CHFL_CHANOP|CHFL_HALFOP))      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
94      {                 me.name, source_p->name, chptr->chname);
95        sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),      return;
                  me.name, source_p->name, chptr->chname);  
       return;  
     }  
96    }    }
97    
98    if (IsMember(target_p, chptr))    if (IsMember(target_p, chptr))
# Line 128  m_invite(struct Client *client_p, struct Line 125  m_invite(struct Client *client_p, struct
125    
126      if (chptr->mode.mode & MODE_INVITEONLY)      if (chptr->mode.mode & MODE_INVITEONLY)
127      {      {
128        if (chptr->mode.mode & MODE_PRIVATE)        /* Only do this if channel is set +i AND +p */
129        {        sendto_channel_local(CHFL_CHANOP|CHFL_HALFOP, 0, chptr,
130          /* Only do this if channel is set +i AND +p */                             ":%s NOTICE @%s :%s is inviting %s to %s.",
131          sendto_channel_local(CHFL_CHANOP|CHFL_HALFOP, 0, chptr,                             me.name, chptr->chname, source_p->name,
132                               ":%s NOTICE @%s :%s is inviting %s to %s.",                             target_p->name, chptr->chname);
133                               me.name, chptr->chname, source_p->name,        sendto_channel_remote(source_p, client_p, CHFL_CHANOP|CHFL_HALFOP,
134                               target_p->name, chptr->chname);                              NOCAPS, NOCAPS, chptr,
135          sendto_channel_remote(source_p, client_p, CHFL_CHANOP|CHFL_HALFOP,                              ":%s NOTICE @%s :%s is inviting %s to %s.",
136                                NOCAPS, NOCAPS, chptr,                              source_p->name, chptr->chname, source_p->name,
137                                ":%s NOTICE @%s :%s is inviting %s to %s.",                              target_p->name, chptr->chname);
                               source_p->name, chptr->chname, source_p->name,  
                               target_p->name, chptr->chname);  
       }  
   
138        /* Add the invite if channel is +i */        /* Add the invite if channel is +i */
139        add_invite(chptr, target_p);        add_invite(chptr, target_p);
140      }      }

Legend:
Removed from v.1476  
changed lines
  Added in v.1477

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