]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-op.c
Enhance debug logging for PONG commands
[ngircd-alex.git] / src / ngircd / irc-op.c
index b75841a805345549b3cb3a247165359b6a0ae5f7..a309ee9f068fcba162c9f393a8b1d46633c3604c 100644 (file)
@@ -150,6 +150,14 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
                return IRC_WriteErrClient(from, ERR_NOSUCHNICK_MSG,
                                          Client_ID(Client), Req->argv[0]);
 
+       if (Req->argv[1][0] == '&') {
+               /* Local channel. Make sure the target user is on this server! */
+               if (Client_Conn(target) == NONE)
+                       return IRC_WriteErrClient(from, ERR_USERNOTONSERV_MSG,
+                                                 Client_ID(Client),
+                                                 Req->argv[0]);
+       }
+
        chan = Channel_Search(Req->argv[1]);
        if (chan) {
                /* Channel exists. Is the user a valid member of the channel? */
@@ -192,7 +200,7 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
                if (remember) {
                        /* We must remember this invite */
                        if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
-                                               true))
+                                               true, Client_ID(from)))
                                return CONNECTED;
                }
        }