mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-19 03:52:52 +00:00
New functions: Lists_SendInvites(), Lists_IsInviteEntry(),
This commit is contained in:
parent
1d8da4b525
commit
6b1e322865
@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: lists.c,v 1.14 2004/04/09 21:41:52 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: lists.c,v 1.15 2004/04/25 15:40:19 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@ -101,6 +101,16 @@ Lists_CheckInvited( CLIENT *Client, CHANNEL *Chan )
|
||||
} /* Lists_CheckInvited */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_IsInviteEntry( CHAR *Mask, CHANNEL *Chan )
|
||||
{
|
||||
assert( Mask != NULL );
|
||||
assert( Chan != NULL );
|
||||
|
||||
return Already_Registered( My_Invites, Mask, Chan );
|
||||
} /* Lists_IsInviteEntry */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_AddInvited( CHAR *Mask, CHANNEL *Chan, BOOLEAN OnlyOnce )
|
||||
{
|
||||
@ -176,6 +186,40 @@ Lists_ShowInvites( CLIENT *Client, CHANNEL *Channel )
|
||||
} /* Lists_ShowInvites */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_SendInvites( CLIENT *Client )
|
||||
{
|
||||
C2C *c2c;
|
||||
|
||||
assert( Client != NULL );
|
||||
|
||||
c2c = My_Invites;
|
||||
while( c2c )
|
||||
{
|
||||
if( ! IRC_WriteStrClient( Client, "MODE %s +I %s", Channel_Name( c2c->channel ), c2c->mask )) return DISCONNECTED;
|
||||
c2c = c2c->next;
|
||||
}
|
||||
return CONNECTED;
|
||||
} /* Lists_SendInvites */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_SendBans( CLIENT *Client )
|
||||
{
|
||||
C2C *c2c;
|
||||
|
||||
assert( Client != NULL );
|
||||
|
||||
c2c = My_Bans;
|
||||
while( c2c )
|
||||
{
|
||||
if( ! IRC_WriteStrClient( Client, "MODE %s +b %s", Channel_Name( c2c->channel ), c2c->mask )) return DISCONNECTED;
|
||||
c2c = c2c->next;
|
||||
}
|
||||
return CONNECTED;
|
||||
} /* Lists_SendBans */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_CheckBanned( CLIENT *Client, CHANNEL *Chan )
|
||||
{
|
||||
@ -183,6 +227,16 @@ Lists_CheckBanned( CLIENT *Client, CHANNEL *Chan )
|
||||
} /* Lists_CheckBanned */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_IsBanEntry( CHAR *Mask, CHANNEL *Chan )
|
||||
{
|
||||
assert( Mask != NULL );
|
||||
assert( Chan != NULL );
|
||||
|
||||
return Already_Registered( My_Bans, Mask, Chan );
|
||||
} /* Lists_IsBanEntry */
|
||||
|
||||
|
||||
GLOBAL BOOLEAN
|
||||
Lists_AddBanned( CHAR *Mask, CHANNEL *Chan )
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: lists.h,v 1.10 2004/04/09 21:41:52 alex Exp $
|
||||
* $Id: lists.h,v 1.11 2004/04/25 15:40:19 alex Exp $
|
||||
*
|
||||
* Management of IRC lists: ban, invite, ... (header)
|
||||
*/
|
||||
@ -25,11 +25,15 @@ GLOBAL BOOLEAN Lists_CheckInvited PARAMS(( CLIENT *Client, CHANNEL *Chan ));
|
||||
GLOBAL BOOLEAN Lists_AddInvited PARAMS(( CHAR *Mask, CHANNEL *Chan, BOOLEAN OnlyOnce ));
|
||||
GLOBAL VOID Lists_DelInvited PARAMS(( CHAR *Mask, CHANNEL *Chan ));
|
||||
GLOBAL BOOLEAN Lists_ShowInvites PARAMS(( CLIENT *Client, CHANNEL *Channel ));
|
||||
GLOBAL BOOLEAN Lists_SendInvites PARAMS(( CLIENT *Client ));
|
||||
GLOBAL BOOLEAN Lists_IsInviteEntry PARAMS(( CHAR *Mask, CHANNEL *Chan ));
|
||||
|
||||
GLOBAL BOOLEAN Lists_CheckBanned PARAMS(( CLIENT *Client, CHANNEL *Chan ));
|
||||
GLOBAL BOOLEAN Lists_AddBanned PARAMS(( CHAR *Mask, CHANNEL *Chan ));
|
||||
GLOBAL VOID Lists_DelBanned PARAMS(( CHAR *Mask, CHANNEL *Chan ));
|
||||
GLOBAL BOOLEAN Lists_ShowBans PARAMS(( CLIENT *Client, CHANNEL *Channel ));
|
||||
GLOBAL BOOLEAN Lists_SendBans PARAMS(( CLIENT *Client ));
|
||||
GLOBAL BOOLEAN Lists_IsBanEntry PARAMS(( CHAR *Mask, CHANNEL *Chan ));
|
||||
|
||||
GLOBAL VOID Lists_DeleteChannel PARAMS(( CHANNEL *Chan ));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user