commit - 791301dc7d0759b6584e23899d0bbdf082a87fa0
commit + d569c9246eb3e57981c102f93ddb9fc14c0f61d6
blob - 3f140064647f44241609bfb928793ee50670b974
blob + fdfdf68fbc1b583966ac1afd8cdf4d3c3f051c6d
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: channel.c,v 1.6 2002/01/26 18:41:55 alex Exp $
+ * $Id: channel.c,v 1.7 2002/01/27 17:14:33 alex Exp $
*
* channel.c: Management der Channels
*
* $Log: channel.c,v $
+ * Revision 1.7 2002/01/27 17:14:33 alex
+ * - diverse Aenderungen fuer Channels ueber mehrere Server.
+ *
* Revision 1.6 2002/01/26 18:41:55 alex
* - CHANNEL- und CL2CHAN-Strukturen in Header verlegt,
* - einige neue Funktionen (Channel_GetChannel(), Channel_FirstMember(), ...)
LOCAL CHANNEL *New_Chan( CHAR *Name );
LOCAL CL2CHAN *Get_Cl2Chan( CHANNEL *Chan, CLIENT *Client );
LOCAL CL2CHAN *Add_Client( CHANNEL *Chan, CLIENT *Client );
-LOCAL BOOLEAN Remove_Client( CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, CHAR *Reason );
+LOCAL BOOLEAN Remove_Client( CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, CHAR *Reason, BOOLEAN ServerPART );
LOCAL CL2CHAN *Get_First_Cl2Chan( CLIENT *Client, CHANNEL *Chan );
LOCAL CL2CHAN *Get_Next_Cl2Chan( CL2CHAN *Start, CLIENT *Client, CHANNEL *Chan );
LOCAL BOOLEAN Delete_Channel( CHANNEL *Chan );
}
/* User aus Channel entfernen */
- if( ! Remove_Client( chan, Client, Origin, Reason )) return FALSE;
+ if( ! Remove_Client( chan, Client, Origin, Reason, TRUE )) return FALSE;
else return TRUE;
} /* Channel_Part */
while( c )
{
next_c = c->next;
- Remove_Client( c, Client, Client_ThisServer( ), Reason );
+ Remove_Client( c, Client, Client_ThisServer( ), Reason, FALSE );
c = next_c;
}
} /* Channel_RemoveClient */
/* Verketten */
cl2chan->next = My_Cl2Chan;
My_Cl2Chan = cl2chan;
-
+
+ Log( LOG_DEBUG, "User \"%s\" joined channel \"%s\".", Client_Mask( Client ), Chan->name );
+
return cl2chan;
} /* Add_Client */
-LOCAL BOOLEAN Remove_Client( CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, CHAR *Reason )
+LOCAL BOOLEAN Remove_Client( CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, CHAR *Reason, BOOLEAN ServerPART )
{
CL2CHAN *cl2chan, *last_cl2chan;
CHANNEL *c;
free( cl2chan );
if( Client_Conn( Origin ) > NONE ) IRC_WriteStrClientPrefix( Origin, Client, "PART %s :%s", c->name, Reason );
- IRC_WriteStrServersPrefix( Origin, Client, "PART %s :%s", c->name, Reason );
- IRC_WriteStrChannelPrefix( Origin, c, Client, "PART %s :%s", c->name, Reason );
+ if( ServerPART ) IRC_WriteStrServersPrefixID( Origin, Client, "PART %s :%s", c->name, Reason );
+ IRC_WriteStrChannelPrefix( Origin, c, Client, FALSE, "PART %s :%s", c->name, Reason );
Log( LOG_DEBUG, "User \"%s\" left channel \"%s\" (%s).", Client_Mask( Client ), c->name, Reason );