X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fchannel.h;h=0e96703d5bdcdf027c6ba9f2ba9b5404561c096c;hp=b912aab4dc5260b7c447e704b3246976741d0d7e;hb=HEAD;hpb=ba32d594fd7a93305cd01a14978971d948392510 diff --git a/src/ngircd/channel.h b/src/ngircd/channel.h index b912aab4..edf6a836 100644 --- a/src/ngircd/channel.h +++ b/src/ngircd/channel.h @@ -1,22 +1,23 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. - * - * Channel management (header) */ - #ifndef __channel_h__ #define __channel_h__ +/** + * @file + * Channel management (header) + */ -#if defined(__channel_c__) | defined(S_SPLINT_S) +#if defined(__channel_c__) #include "lists.h" #include "defines.h" @@ -37,6 +38,7 @@ typedef struct _CHANNEL char key[CLIENT_PASS_LEN]; /* Channel key ("password", mode "k" ) */ unsigned long maxusers; /* Maximum number of members (mode "l") */ struct list_head list_bans; /* list head of banned users */ + struct list_head list_excepts; /* list head of (ban) exception list */ struct list_head list_invites; /* list head of invited users */ array keyfile; /* Name of the channel key file */ } CHANNEL; @@ -57,6 +59,7 @@ typedef POINTER CL2CHAN; #endif GLOBAL struct list_head *Channel_GetListBans PARAMS((CHANNEL *c)); +GLOBAL struct list_head *Channel_GetListExcepts PARAMS((CHANNEL *c)); GLOBAL struct list_head *Channel_GetListInvites PARAMS((CHANNEL *c)); GLOBAL void Channel_Init PARAMS(( void )); @@ -71,12 +74,11 @@ GLOBAL void Channel_Quit PARAMS(( CLIENT *Client, const char *Reason )); GLOBAL void Channel_Kick PARAMS((CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name, const char *Reason)); -GLOBAL unsigned long Channel_Count PARAMS(( void )); +GLOBAL unsigned long Channel_CountVisible PARAMS((CLIENT *Client)); GLOBAL unsigned long Channel_MemberCount PARAMS(( CHANNEL *Chan )); GLOBAL int Channel_CountForUser PARAMS(( CLIENT *Client )); GLOBAL const char *Channel_Name PARAMS(( const CHANNEL *Chan )); -GLOBAL char *Channel_Modes PARAMS(( CHANNEL *Chan )); GLOBAL char *Channel_Topic PARAMS(( CHANNEL *Chan )); GLOBAL char *Channel_Key PARAMS(( CHANNEL *Chan )); GLOBAL unsigned long Channel_MaxUsers PARAMS(( CHANNEL *Chan )); @@ -103,9 +105,12 @@ GLOBAL bool Channel_IsValidName PARAMS(( const char *Name )); GLOBAL bool Channel_ModeAdd PARAMS(( CHANNEL *Chan, char Mode )); GLOBAL bool Channel_ModeDel PARAMS(( CHANNEL *Chan, char Mode )); +GLOBAL bool Channel_HasMode PARAMS(( CHANNEL *Chan, char Mode )); +GLOBAL char *Channel_Modes PARAMS(( CHANNEL *Chan )); GLOBAL bool Channel_UserModeAdd PARAMS(( CHANNEL *Chan, CLIENT *Client, char Mode )); GLOBAL bool Channel_UserModeDel PARAMS(( CHANNEL *Chan, CLIENT *Client, char Mode )); +GLOBAL bool Channel_UserHasMode PARAMS(( CHANNEL *Chan, CLIENT *Client, char Mode )); GLOBAL char *Channel_UserModes PARAMS(( CHANNEL *Chan, CLIENT *Client )); GLOBAL bool Channel_IsMemberOf PARAMS(( CHANNEL *Chan, CLIENT *Client )); @@ -122,10 +127,13 @@ GLOBAL char *Channel_TopicWho PARAMS(( CHANNEL *Chan )); GLOBAL unsigned int Channel_CreationTime PARAMS(( CHANNEL *Chan )); #endif -GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask, bool OnlyOnce )); -GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask )); +GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask, const char *who)); +GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask, const char *who)); +GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask, + bool OnlyOnce, const char *who)); GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c)); +GLOBAL bool Channel_ShowExcepts PARAMS((CLIENT *client, CHANNEL *c)); GLOBAL bool Channel_ShowInvites PARAMS((CLIENT *client, CHANNEL *c)); GLOBAL void Channel_LogServer PARAMS((const char *msg));