]> arthur.barton.de Git - ngircd.git/commitdiff
Don't allow SQUERY to send to "target masks" and channels; only services!
authorAlexander Barton <alex@barton.de>
Sun, 17 Aug 2008 13:06:33 +0000 (15:06 +0200)
committerAlexander Barton <alex@barton.de>
Tue, 23 Sep 2008 09:53:16 +0000 (11:53 +0200)
src/ngircd/irc.c

index 8d2291fe20a0dabdbfe0e0ac109bf1cc18c346a5..b88d5d7db7cc7a1320eb94027ca6835518c9a4cc 100644 (file)
@@ -454,13 +454,15 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                                                      Req->command, Client_ID(cl),
                                                      Req->argv[1]))
                                return DISCONNECTED;
-               } else if (strchr("$#", currentTarget[0])
+               } else if (ForceType != CLIENT_SERVICE
+                          && strchr("$#", currentTarget[0])
                           && strchr(currentTarget, '.')) {
                        /* targetmask */
                        if (!Send_Message_Mask(from, Req->command, currentTarget,
                                               Req->argv[1], SendErrors))
                                return DISCONNECTED;
-               } else if ((chan = Channel_Search(currentTarget))) {
+               } else if (ForceType != CLIENT_SERVICE
+                          && (chan = Channel_Search(currentTarget))) {
                        /* channel */
                        if (!Channel_Write(chan, from, Client, Req->command,
                                           SendErrors, Req->argv[1]))