about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c
index 47f86528..e5f5bbd5 100644
--- a/src/ngircd/irc.c
+++ b/src/ngircd/irc.c
@@ -467,18 +467,18 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
 						      Req->argv[1]))
 				return DISCONNECTED;
 		} else if (ForceType != CLIENT_SERVICE
+			   && (chan = Channel_Search(currentTarget))) {
+			/* channel */
+			if (!Channel_Write(chan, from, Client, Req->command,
+					   SendErrors, Req->argv[1]))
+					return DISCONNECTED;
+		} 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 (ForceType != CLIENT_SERVICE
-			   && (chan = Channel_Search(currentTarget))) {
-			/* channel */
-			if (!Channel_Write(chan, from, Client, Req->command,
-					   SendErrors, Req->argv[1]))
-					return DISCONNECTED;
 		} else {
 			if (!SendErrors)
 				return CONNECTED;