]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-op.c
Implemented xop support
[ngircd-alex.git] / src / ngircd / irc-op.c
index 5e36b02bef478ce9ac2a0d96e411deaf2e11c4cc..08495475f60520c7dd899d7cef9e10b4f4852550 100644 (file)
@@ -166,8 +166,11 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
 
                /* Is the channel "invite-only"? */
                if (strchr(Channel_Modes(chan), 'i')) {
-                       /* Yes. The user must be channel operator! */
-                       if (!strchr(Channel_UserModes(chan, from), 'o'))
+                       /* Yes. The user must be channel owner/admin/operator/halfop! */
+                       if (!strchr(Channel_UserModes(chan, from), 'q') &&
+                           !strchr(Channel_UserModes(chan, from), 'a') &&
+                           !strchr(Channel_UserModes(chan, from), 'o') &&
+                           !strchr(Channel_UserModes(chan, from), 'h'))
                                return IRC_WriteStrClient(from, ERR_CHANOPRIVSNEEDED_MSG,
                                                Client_ID(from), Channel_Name(chan));
                        remember = true;