+#endif
+ if (SendErrors && !IRC_WriteErrClient(
+ from, ERR_NOSUCHNICK_MSG,Client_ID(from),
+ currentTarget))
+ return DISCONNECTED;
+ goto send_next_target;
+ }
+
+#ifndef STRICT_RFC
+ if (ForceType == CLIENT_SERVICE &&
+ (Conn_Options(Client_Conn(Client_NextHop(cl)))
+ & CONN_RFC1459)) {
+ /* SQUERY command but RFC 1459 link: convert
+ * request to PRIVMSG command */
+ Req->command = "PRIVMSG";
+ }
+#endif
+ if (Client_HasMode(cl, 'b') &&
+ !Client_HasMode(from, 'R') &&
+ !Client_HasMode(from, 'o') &&
+ !(Client_Type(from) == CLIENT_SERVER) &&
+ !(Client_Type(from) == CLIENT_SERVICE)) {
+ if (SendErrors && !IRC_WriteErrClient(from,
+ ERR_NONONREG_MSG,
+ Client_ID(from), Client_ID(cl)))
+ return DISCONNECTED;
+ goto send_next_target;
+ }
+
+ if (Client_HasMode(cl, 'C')) {
+ cl2chan = Channel_FirstChannelOf(cl);
+ while (cl2chan) {
+ chan = Channel_GetChannel(cl2chan);
+ if (Channel_IsMemberOf(chan, from))
+ break;
+ cl2chan = Channel_NextChannelOf(cl, cl2chan);
+ }
+ if (!cl2chan) {
+ if (SendErrors && !IRC_WriteErrClient(
+ from, ERR_NOTONSAMECHANNEL_MSG,
+ Client_ID(from), Client_ID(cl)))
+ return DISCONNECTED;
+ goto send_next_target;
+ }
+ }
+
+ if (SendErrors && (Client_Type(Client) != CLIENT_SERVER)
+ && Client_HasMode(cl, 'a')) {