Commit Diff


commit - 1d8da4b5258ee1685d0443a182c6106ceb608a23
commit + 6b1e322865e9ffadacb2455bd76f3e59aa669501
blob - 0f08bc61463590e532becf1a48eec335e10579af
blob + 708b2ead394b1382b0984c513d8ed60393013080
--- src/ngircd/lists.c
+++ src/ngircd/lists.c
@@ -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>
@@ -102,6 +102,16 @@ Lists_CheckInvited( CLIENT *Client, CHANNEL *Chan )
 
 
 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 )
 {
 	C2C *c2c;
@@ -174,9 +184,43 @@ Lists_ShowInvites( CLIENT *Client, CHANNEL *Channel )
 	}
 	return IRC_WriteStrClient( Client, RPL_ENDOFINVITELIST_MSG, Client_ID( Client ), Channel_Name( 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 )
 {
 	return Check_List( &My_Bans, Client, Chan );
@@ -184,6 +228,16 @@ Lists_CheckBanned( CLIENT *Client, CHANNEL *Chan )
 
 
 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 )
 {
 	C2C *c2c;
blob - a1380a9fc72c7d1808eca3fdc429446a58659235
blob + f9b3ff2feaa09f8d9b091ca405caa1d933a8bc86
--- src/ngircd/lists.h
+++ src/ngircd/lists.h
@@ -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 *Cli
 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 ));