mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-12 18:00:28 +00:00
- new function Channel_CountForUser().
This commit is contained in:
parent
427be23b6e
commit
b7eb5f66dc
@ -17,7 +17,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: channel.c,v 1.35 2002/12/12 12:24:18 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: channel.c,v 1.36 2002/12/13 17:22:57 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@ -292,6 +292,30 @@ Channel_MemberCount( CHANNEL *Chan )
|
||||
} /* Channel_MemberCount */
|
||||
|
||||
|
||||
GLOBAL INT
|
||||
Channel_CountForUser( CHANNEL *Chan, CLIENT *Client )
|
||||
{
|
||||
/* Count number of channels a user is member of. */
|
||||
|
||||
CL2CHAN *cl2chan;
|
||||
INT count;
|
||||
|
||||
assert( Chan != NULL );
|
||||
assert( Client != NULL );
|
||||
|
||||
count = 0;
|
||||
cl2chan = My_Cl2Chan;
|
||||
while( cl2chan )
|
||||
{
|
||||
if( cl2chan->client == Client ) count++;
|
||||
cl2chan = cl2chan->next;
|
||||
}
|
||||
|
||||
return count;
|
||||
} /* Channel_CountForUser */
|
||||
|
||||
|
||||
|
||||
GLOBAL CHAR *
|
||||
Channel_Name( CHANNEL *Chan )
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: channel.h,v 1.23 2002/12/12 12:23:43 alex Exp $
|
||||
* $Id: channel.h,v 1.24 2002/12/13 17:22:57 alex Exp $
|
||||
*
|
||||
* Channel management (header)
|
||||
*/
|
||||
@ -47,54 +47,55 @@ typedef POINTER CL2CHAN;
|
||||
#endif
|
||||
|
||||
|
||||
GLOBAL VOID Channel_Init PARAMS((VOID ));
|
||||
GLOBAL VOID Channel_InitPredefined PARAMS(( VOID ));
|
||||
GLOBAL VOID Channel_Exit PARAMS((VOID ));
|
||||
GLOBAL VOID Channel_Init PARAMS(( VOID ));
|
||||
GLOBAL VOID Channel_InitPredefined PARAMS(( VOID ));
|
||||
GLOBAL VOID Channel_Exit PARAMS(( VOID ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_Join PARAMS((CLIENT *Client, CHAR *Name ));
|
||||
GLOBAL BOOLEAN Channel_Part PARAMS((CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *Reason ));
|
||||
GLOBAL BOOLEAN Channel_Join PARAMS(( CLIENT *Client, CHAR *Name ));
|
||||
GLOBAL BOOLEAN Channel_Part PARAMS(( CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *Reason ));
|
||||
|
||||
GLOBAL VOID Channel_Quit PARAMS((CLIENT *Client, CHAR *Reason ));
|
||||
GLOBAL VOID Channel_Quit PARAMS(( CLIENT *Client, CHAR *Reason ));
|
||||
|
||||
GLOBAL VOID Channel_Kick PARAMS(( CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *Reason ));
|
||||
GLOBAL VOID Channel_Kick PARAMS(( CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *Reason ));
|
||||
|
||||
GLOBAL LONG Channel_Count PARAMS((VOID ));
|
||||
GLOBAL LONG Channel_MemberCount PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL LONG Channel_Count PARAMS(( VOID ));
|
||||
GLOBAL LONG Channel_MemberCount PARAMS(( CHANNEL *Chan ));
|
||||
GLOBAL INT Channel_CountForUser PARAMS(( CHANNEL *Chan, CLIENT *Client ));
|
||||
|
||||
GLOBAL CHAR *Channel_Name PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL CHAR *Channel_Modes PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL CHAR *Channel_Topic PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL CHAR *Channel_Name PARAMS(( CHANNEL *Chan ));
|
||||
GLOBAL CHAR *Channel_Modes PARAMS(( CHANNEL *Chan ));
|
||||
GLOBAL CHAR *Channel_Topic PARAMS(( CHANNEL *Chan ));
|
||||
|
||||
GLOBAL VOID Channel_SetTopic PARAMS((CHANNEL *Chan, CHAR *Topic ));
|
||||
GLOBAL VOID Channel_SetModes PARAMS((CHANNEL *Chan, CHAR *Modes ));
|
||||
GLOBAL VOID Channel_SetTopic PARAMS(( CHANNEL *Chan, CHAR *Topic ));
|
||||
GLOBAL VOID Channel_SetModes PARAMS(( CHANNEL *Chan, CHAR *Modes ));
|
||||
|
||||
GLOBAL CHANNEL *Channel_Search PARAMS((CHAR *Name ));
|
||||
GLOBAL CHANNEL *Channel_Search PARAMS(( CHAR *Name ));
|
||||
|
||||
GLOBAL CHANNEL *Channel_First PARAMS((VOID ));
|
||||
GLOBAL CHANNEL *Channel_Next PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL CHANNEL *Channel_First PARAMS(( VOID ));
|
||||
GLOBAL CHANNEL *Channel_Next PARAMS(( CHANNEL *Chan ));
|
||||
|
||||
GLOBAL CL2CHAN *Channel_FirstMember PARAMS((CHANNEL *Chan ));
|
||||
GLOBAL CL2CHAN *Channel_NextMember PARAMS((CHANNEL *Chan, CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CL2CHAN *Channel_FirstChannelOf PARAMS((CLIENT *Client ));
|
||||
GLOBAL CL2CHAN *Channel_NextChannelOf PARAMS((CLIENT *Client, CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CL2CHAN *Channel_FirstMember PARAMS(( CHANNEL *Chan ));
|
||||
GLOBAL CL2CHAN *Channel_NextMember PARAMS(( CHANNEL *Chan, CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CL2CHAN *Channel_FirstChannelOf PARAMS(( CLIENT *Client ));
|
||||
GLOBAL CL2CHAN *Channel_NextChannelOf PARAMS(( CLIENT *Client, CL2CHAN *Cl2Chan ));
|
||||
|
||||
GLOBAL CLIENT *Channel_GetClient PARAMS((CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CHANNEL *Channel_GetChannel PARAMS((CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CLIENT *Channel_GetClient PARAMS(( CL2CHAN *Cl2Chan ));
|
||||
GLOBAL CHANNEL *Channel_GetChannel PARAMS(( CL2CHAN *Cl2Chan ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_IsValidName PARAMS((CHAR *Name ));
|
||||
GLOBAL BOOLEAN Channel_IsValidName PARAMS(( CHAR *Name ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_ModeAdd PARAMS((CHANNEL *Chan, CHAR Mode ));
|
||||
GLOBAL BOOLEAN Channel_ModeDel PARAMS((CHANNEL *Chan, CHAR Mode ));
|
||||
GLOBAL BOOLEAN Channel_ModeAdd PARAMS(( CHANNEL *Chan, CHAR Mode ));
|
||||
GLOBAL BOOLEAN Channel_ModeDel PARAMS(( CHANNEL *Chan, CHAR Mode ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_UserModeAdd PARAMS((CHANNEL *Chan, CLIENT *Client, CHAR Mode ));
|
||||
GLOBAL BOOLEAN Channel_UserModeDel PARAMS((CHANNEL *Chan, CLIENT *Client, CHAR Mode ));
|
||||
GLOBAL CHAR *Channel_UserModes PARAMS((CHANNEL *Chan, CLIENT *Client ));
|
||||
GLOBAL BOOLEAN Channel_UserModeAdd PARAMS(( CHANNEL *Chan, CLIENT *Client, CHAR Mode ));
|
||||
GLOBAL BOOLEAN Channel_UserModeDel PARAMS(( CHANNEL *Chan, CLIENT *Client, CHAR Mode ));
|
||||
GLOBAL CHAR *Channel_UserModes PARAMS(( CHANNEL *Chan, CLIENT *Client ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_IsMemberOf PARAMS((CHANNEL *Chan, CLIENT *Client ));
|
||||
GLOBAL BOOLEAN Channel_IsMemberOf PARAMS(( CHANNEL *Chan, CLIENT *Client ));
|
||||
|
||||
GLOBAL BOOLEAN Channel_Write PARAMS((CHANNEL *Chan, CLIENT *From, CLIENT *Client, CHAR *Text ));
|
||||
GLOBAL BOOLEAN Channel_Write PARAMS(( CHANNEL *Chan, CLIENT *From, CLIENT *Client, CHAR *Text ));
|
||||
|
||||
GLOBAL CHANNEL *Channel_Create PARAMS((CHAR *Name ));
|
||||
GLOBAL CHANNEL *Channel_Create PARAMS(( CHAR *Name ));
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user