]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
send_linebuf_remote(): Remove broken and useless ghost check that can never happen.
authorJilles Tjoelker <redacted>
Thu, 17 Jan 2008 00:06:32 +0000 (01:06 +0100)
committerJilles Tjoelker <redacted>
Thu, 17 Jan 2008 00:06:32 +0000 (01:06 +0100)
Reasoning why it never does anything:
- the to = to->from line makes sure that MyConnect(to)
- then IsPerson(to) && (to == from->from) implies that to == from
- so MyClient(to)
- which cannot happen because it also wants that !MyClient(from)

Originally, the to = to->from line was below, and it did a
fake direction check, killing a client if servers could be
confused about it. The kill cannot do any good with TS6.

The fake direction check is and was performed by the
callers of send_linebuf_remote().

src/send.c

index c094cdf97d74b4ef89e5898e1b25a930f7460c74..d33e16ce8aa008e215f82111246c8291d8dc33c8 100644 (file)
@@ -124,30 +124,7 @@ send_linebuf_remote(struct Client *to, struct Client *from, buf_head_t *linebuf)
        if(to->from)
                to = to->from;
 
-       /* test for fake direction */
-       if(!MyClient(from) && IsPerson(to) && (to == from->from))
-       {
-               if(IsServer(from))
-               {
-                       sendto_realops_snomask(SNO_GENERAL, L_ALL,
-                                            "Send message to %s[%s] dropped from %s(Fake Dir)",
-                                            to->name, to->from->name, from->name);
-                       return;
-               }
-
-               sendto_realops_snomask(SNO_GENERAL, L_ALL,
-                                    "Ghosted: %s[%s@%s] from %s[%s@%s] (%s)",
-                                    to->name, to->username, to->host,
-                                    from->name, from->username, from->host, to->from->name);
-               kill_client_serv_butone(NULL, to, "%s (%s[%s@%s] Ghosted %s)",
-                                       me.name, to->name, to->username,
-                                       to->host, to->from->name);
-
-               to->flags |= FLAGS_KILLED;
-
-               exit_client(NULL, to, &me, "Ghosted client");
-               return;
-       }
+       /* we assume the caller has already tested for fake direction */
 
        _send_linebuf(to, linebuf);
        return;