Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-11-16 04:20:53 UTC
Modified files:
ChangeLog ircd/m_nick.c
Log message:
Stop sending nicknames as the first argument to KILL.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.741 ircu2.10/ChangeLog:1.742
--- ircu2.10/ChangeLog:1.741 Mon Nov 14 19:36:26 2005
+++ ircu2.10/ChangeLog Tue Nov 15 20:20:43 2005
@@ -1,3 +1,9 @@
+2005-11-15 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/m_nick.c (ms_nick): Clarify message when an older nick
+ overrules a newer nick. When killing a client for a nick
+ collision, make sure to use the numnick as the first argument.
+
2005-11-14 Michael Poole <[EMAIL PROTECTED]>
* ircd/channel.c (member_can_send_to_channel): After prodding from
Index: ircu2.10/ircd/m_nick.c
diff -u ircu2.10/ircd/m_nick.c:1.25 ircu2.10/ircd/m_nick.c:1.26
--- ircu2.10/ircd/m_nick.c:1.25 Sat Mar 19 15:22:09 2005
+++ ircu2.10/ircd/m_nick.c Tue Nov 15 20:20:43 2005
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_nick.c,v 1.25 2005/03/19 23:22:09 entrope Exp $
+ * $Id: m_nick.c,v 1.26 2005/11/16 04:20:43 entrope Exp $
*/
/*
@@ -430,7 +430,7 @@
"%C (%C %Tu <- %C %Tu)", sptr, acptr, cli_from(acptr),
cli_lastnick(acptr), cptr, lastnick);
}
- type = differ ? "older nick overruled" : "nick collision from same [EMAIL
PROTECTED]";
+ type = differ ? "overruled by older nick" : "nick collision from same [EMAIL
PROTECTED]";
/*
* Now remove (kill) the nick on our side if it is the youngest.
* If no timestamp was received, we ignore the incoming nick
@@ -443,40 +443,32 @@
if ((differ && lastnick >= cli_lastnick(acptr)) ||
(!differ && lastnick <= cli_lastnick(acptr)))
{
- /* We need to bounce this kill straight back... Although the nick message
- * for acptr is probably waiting in their recvq from me, its also possible
- * that sptr will change their nick on cptr before cptr receives the
- * nick message for acptr, which would leave acptr and sptr both alive
- * on cptr, but only acptr alive on me, i.e. desync. This extra kill
- * message has been absent for a while in ircu although it was a major
- * problem when it was tried on efnet, so I don't know how big an issue it
- * is. Probably best that this be left here, anyway...
- */
ServerStats->is_kill++;
- sendcmdto_one(&me, CMD_KILL, cptr, "%s :%s (%s)",
- nick, cli_name(&me), type);
- /* But if this was a nick change and not a nick introduction,
- * we also need to ensure that we remove our local state
- * record of the original client... Also, the rest of the
- * net should be informed...
- */
if (!IsServer(sptr))
{
+ /* If this was a nick change and not a nick introduction, we
+ * need to ensure that we remove our record of the client, and
+ * send a KILL to the whole network.
+ */
assert(!MyConnect(sptr));
/* Inform the rest of the net... */
- sendcmdto_serv_butone(&me, CMD_KILL, cptr, "%s :%s (%s)",
- nick, cli_name(&me), type);
+ sendcmdto_serv_butone(&me, CMD_KILL, 0, "%C :%s (%s)",
+ sptr, cli_name(&me), type);
/* Don't go sending off a QUIT message... */
SetFlag(sptr, FLAG_KILLED);
/* Remove them locally. */
exit_client_msg(cptr, sptr, &me,
"Killed (%s (%s))",
feature_str(FEAT_HIS_SERVERNAME), type);
- /*
- * We have killed sptr off, zero out it's pointer so if it's used
- * again we'll know about it --Bleep
+ }
+ else
+ {
+ /* If the origin is a server, this was a new client, so we only
+ * send the KILL in the direction it came from. We have no
+ * client record that we would have to clean up.
*/
- sptr = NULL;
+ sendcmdto_one(&me, CMD_KILL, cptr, "%s :%s (%s)",
+ parv[parc - 2], cli_name(&me), type);
}
/* If the timestamps differ and we just killed sptr, we don't need to kill
* acptr as well.
@@ -492,8 +484,8 @@
/*
* This exits the client we had before getting the NICK message
*/
- sendcmdto_serv_butone(&me, CMD_KILL, NULL, "%C :%s"
- " (%s)", acptr, feature_str(FEAT_HIS_SERVERNAME),
+ sendcmdto_serv_butone(&me, CMD_KILL, NULL, "%C :%s (%s)",
+ acptr, feature_str(FEAT_HIS_SERVERNAME),
type);
exit_client_msg(cptr, acptr, &me, "Killed (%s (%s))",
feature_str(FEAT_HIS_SERVERNAME), type);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches