repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 517321807ea8c1c8f475f13b2c2bdc336acd795c:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 517321807ea8c1c8f475f13b2c2bdc336acd795c
Author: Florian Westphal 
Date:   Sat Jun 4 11:53:24 2005 +0000

    Fix Handling of quit messages: always send only one QUIT message.

diff --git a/ChangeLog b/ChangeLog
index abfbe5a0edcf6120d083ae4541fb8da47bddc2d8..
index ..8a44b875a1518b5d5d36b4c88f20cc41ca292750 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@


 ngIRCd CVSHEAD
+  - Fix handling of QUIT Messages: send only one message, even if client
+    is member of multiple channels.
   - Don't exit server if closing of a socket fails; instead ignore it and
     pray that this will be "the right thing" ...
   - Implemented the IRC function "WHOWAS".
@@ -601,4 +603,4 @@ ngIRCd 0.0.1, 31.12.2001


 -- 
-$Id: ChangeLog,v 1.271 2005/05/22 23:55:57 alex Exp $
+$Id: ChangeLog,v 1.272 2005/06/04 11:53:24 fw Exp $
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index f92f20dbeb193e2be1726f163487ab8ccd2241e4..
index ..56029195a21c2bd02e1d1d03c4f3d30282542039 100644
--- a/src/ngircd/channel.c
+++ b/src/ngircd/channel.c
@@ -17,7 +17,7 @@

 #include "portab.h"

-static char UNUSED id[] = "$Id: channel.c,v 1.47 2005/04/27 07:34:25 alex Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.48 2005/06/04 11:53:25 fw Exp $";

 #include "imp.h"
 #include 
@@ -248,6 +248,8 @@ Channel_Quit( CLIENT *Client, char *Reason )
 	assert( Client != NULL );
 	assert( Reason != NULL );

+	IRC_WriteStrRelatedPrefix( Client, Client, false, "QUIT :%s", Reason );
+
 	c = My_Channels;
 	while( c )
 	{
@@ -807,7 +809,6 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Re
 			/* QUIT: andere Server wurden bereits informiert, vgl. Client_Destroy();
 			 * hier also "nur" noch alle User in betroffenen Channeln infomieren */
 			assert( InformServer == false );
-			IRC_WriteStrChannelPrefix( Origin, c, Origin, false, "QUIT :%s", Reason );
 			Log( LOG_DEBUG, "User \"%s\" left channel \"%s\" (%s).", Client_Mask( Client ), c->name, Reason );
 			break;
 		case REMOVE_KICK:

-----END OF PAGE-----