- neue Funktion Channel_MemberCount() implementiert.

This commit is contained in:
Alexander Barton 2002-04-23 19:51:31 +00:00
parent 3c0c3c3c5f
commit f22f1cf4f4
2 changed files with 21 additions and 2 deletions

View File

@ -9,7 +9,7 @@
* 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.20 2002/03/25 16:54:26 alex Exp $
* $Id: channel.c,v 1.21 2002/04/23 19:51:31 alex Exp $
*
* channel.c: Management der Channels
*/
@ -171,6 +171,24 @@ GLOBAL INT Channel_Count( VOID )
} /* Channel_Count */
GLOBAL INT Channel_MemberCount( CHANNEL *Chan )
{
CL2CHAN *cl2chan;
INT count;
assert( Chan != NULL );
count = 0;
cl2chan = My_Cl2Chan;
while( cl2chan )
{
if( cl2chan->channel == Chan ) count++;
cl2chan = cl2chan->next;
}
return count;
} /* Channel_MemberCount */
GLOBAL CHAR *Channel_Name( CHANNEL *Chan )
{
assert( Chan != NULL );

View File

@ -9,7 +9,7 @@
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
* $Id: channel.h,v 1.16 2002/03/25 19:11:01 alex Exp $
* $Id: channel.h,v 1.17 2002/04/23 19:51:31 alex Exp $
*
* channel.h: Management der Channels (Header)
*/
@ -59,6 +59,7 @@ GLOBAL BOOLEAN Channel_Part( CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *R
GLOBAL VOID Channel_RemoveClient( CLIENT *Client, CHAR *Reason );
GLOBAL INT Channel_Count( VOID );
GLOBAL INT Channel_MemberCount( CHANNEL *Chan );
GLOBAL CHAR *Channel_Name( CHANNEL *Chan );
GLOBAL CHAR *Channel_Modes( CHANNEL *Chan );