diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index 3e1e710b..31e568ca 100644 --- a/src/ngircd/channel.c +++ b/src/ngircd/channel.c @@ -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 ); diff --git a/src/ngircd/channel.h b/src/ngircd/channel.h index 6728e5a6..d0752bca 100644 --- a/src/ngircd/channel.h +++ b/src/ngircd/channel.h @@ -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 );