Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Sat, 21 Jul 2001 23:05:51 +0000 (23:05 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Sat, 21 Jul 2001 23:05:51 +0000 (23:05 +0000)
Log message:

If servers are disconnected through a call to exit_client()--say by a squit
or something else, perhaps an access check--the server would send a raw
message like "ERROR :Closing Link [...]".  The server interprets "ERROR" as
a numeric nick, and since in most cases, that numeric nick doesn't exist,
it ignores the message.  This means that servers that closed the connection
frequently did so without the proper (and useful) error message.  This fix
simply uses sendrawto_one() only for clients, and uses sendcmdto_one() for
servers, fixing the error.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@534 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/s_misc.c

index b4580872b0fdb9777776a0ec00ad4b2cfceb2a14..c4f4fa2aaaa725aa0e4c5546341f16dc6044f096 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-21  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * ircd/s_misc.c (exit_client): servers don't understand what the
+       numeric nick ERROR is supposed to mean, so they ignore error
+       messages, resulting in not knowing why we were rejected; use
+       sendcmdto_one for servers and sendrawto_one for clients
+
 2001-07-17  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_burst.c (ms_burst): in the case of a modeless channel and
index 99ed512d81e0694881b0f5570857fb30ae6cddcb..b4d9af7013dd85294f46eb911b0d5c36a3cd3f3e 100644 (file)
@@ -403,9 +403,15 @@ int exit_client(struct Client *cptr,    /* Connection being handled by
       if (IsServer(victim) || IsHandshake(victim))
        sendcmdto_one(killer, CMD_SQUIT, victim, "%s 0 :%s", cli_name(&me), comment);
       else if (!IsConnecting(victim)) {
-        if (!IsDead(victim))
-         sendrawto_one(victim, MSG_ERROR " :Closing Link: %s by %s (%s)",
-                       cli_name(victim), cli_name(killer), comment);
+        if (!IsDead(victim)) {
+         if (IsServer(victim))
+           sendcmdto_one(killer, CMD_ERROR, victim,
+                         ":Closing Link: %s by %s (%s)", cli_name(victim),
+                         cli_name(killer), comment);
+         else
+           sendrawto_one(victim, MSG_ERROR " :Closing Link: %s by %s (%s)",
+                         cli_name(victim), cli_name(killer), comment);
+       }
       }
       if ((IsServer(victim) || IsHandshake(victim) || IsConnecting(victim)) &&
           (killer == &me || (IsServer(killer) &&