repo: ngircd action: commit revision: path_from: revision_from: 3afa0e06583d7f5d353f398147e9a3fd570d2720: path_to: revision_to:
commit 3afa0e06583d7f5d353f398147e9a3fd570d2720 Author: Alexander BartonDate: Sun Aug 17 15:06:33 2008 +0200 Don't allow SQUERY to send to "target masks" and channels; only services! diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
--- 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]))
-----END OF PAGE-----