commit - 6b1e322865e9ffadacb2455bd76f3e59aa669501
commit + 967476799f6fa2b30f82cbebb270d055ec63a547
blob - fbeb3cc49a42baf9a1c3cda3f6a14710d3f8f883
blob + 69820d1d28d5da4e725039427d16d68eecf8e199
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.34 2004/04/09 21:41:52 alex Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.35 2004/04/25 15:42:05 alex Exp $";
#include "imp.h"
#include <assert.h>
Add_Invite( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, CHAR *Pattern )
{
CHAR *mask;
+ BOOLEAN already;
assert( Client != NULL );
assert( Channel != NULL );
mask = Lists_MakeMask( Pattern );
+ already = Lists_IsInviteEntry( mask, Channel );
+
if( ! Lists_AddInvited( mask, Channel, FALSE )) return CONNECTED;
+
+ if(( Client_Type( Prefix ) == CLIENT_SERVER ) && ( already == TRUE )) return CONNECTED;
return Send_ListChange( "+I", Prefix, Client, Channel, mask );
} /* Add_Invite */
Add_Ban( CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, CHAR *Pattern )
{
CHAR *mask;
+ BOOLEAN already;
assert( Client != NULL );
assert( Channel != NULL );
mask = Lists_MakeMask( Pattern );
+ already = Lists_IsBanEntry( mask, Channel );
+
if( ! Lists_AddBanned( mask, Channel )) return CONNECTED;
+ if(( Client_Type( Prefix ) == CLIENT_SERVER ) && ( already == TRUE )) return CONNECTED;
+
return Send_ListChange( "+b", Prefix, Client, Channel, mask );
} /* Add_Ban */