summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2008-08-17 15:06:33 +0200
committerAlexander Barton <alex@barton.de>2008-09-23 11:53:16 +0200
commit3afa0e06583d7f5d353f398147e9a3fd570d2720 (patch)
tree5dcc6cdd53f64254e8db1f8cf9fd35ade2d8daf5 /src
parent3913de3cffaa4a3641075d4b4df4aea388bc3717 (diff)
downloadngircd-3afa0e06583d7f5d353f398147e9a3fd570d2720.tar.gz
ngircd-3afa0e06583d7f5d353f398147e9a3fd570d2720.zip
Don't allow SQUERY to send to "target masks" and channels; only services!
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 8d2291fe..b88d5d7d 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -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]))