]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc.c
irc.c: Fix handling of channels containing dots
[ngircd-alex.git] / src / ngircd / irc.c
index 47f86528004d24a009504076108ded7fc7b2f8c6..e5f5bbd5ddeab864b153533fa36336f5cb5d009d 100644 (file)
@@ -466,6 +466,12 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                                                      Req->command, Client_ID(cl),
                                                      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, '.')) {
@@ -473,12 +479,6 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                        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;