]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Disallow invites to juped channels.
authorJilles Tjoelker <redacted>
Fri, 6 Feb 2009 13:07:03 +0000 (14:07 +0100)
committerJilles Tjoelker <redacted>
Fri, 6 Feb 2009 13:07:03 +0000 (14:07 +0100)
In particular, this is checked when the source is
local and not resv_exempt, or the target is local and
not resv_exempt.

modules/m_invite.c

index 91254adb4d48f043353a4ca04e8484fb2f6d0c43..cff1f83b8a5fc476550cb138e7f3999494bafabc 100644 (file)
@@ -109,6 +109,16 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char
                return 0;
        }
 
+       if(((MyConnect(source_p) && !IsExemptResv(source_p)) ||
+                       (MyConnect(target_p) && !IsExemptResv(target_p))) &&
+               hash_find_resv(parv[2]))
+       {
+               sendto_one_numeric(source_p, ERR_BADCHANNAME,
+                                  form_str(ERR_BADCHANNAME),
+                                  parv[2]);
+               return 0;
+       }
+
        if((chptr = find_channel(parv[2])) == NULL)
        {
                sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,