Commit Diff


commit - 1d524784ffa864f4b018ab8b4cc7016828de6d9e
commit + 81a26d988af12111ab5a83173268f3ae79fe421e
blob - 8bc38307e5dcb3b71b03383e8a8b13d4f8670216
blob + e426310903469c7987acf5f3909dd1ea240e4fc8
--- src/ngircd/irc-op.c
+++ src/ngircd/irc-op.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-op.c,v 1.5 2002/06/11 13:59:07 alex Exp $
+ * $Id: irc-op.c,v 1.6 2002/07/15 16:35:21 alex Exp $
  *
  * irc-op.c: Befehle zur Channel-Verwaltung
  */
@@ -124,8 +124,11 @@ IRC_INVITE( CLIENT *Client, REQUEST *Req )
 	}
 
 	Log( LOG_DEBUG, "User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask( from ), Req->argv[0], Req->argv[1] );
+	if( remember )
+	{
+		if( ! Lists_AddInvited( Client_Mask( target ), chan, TRUE )) return CONNECTED;
+	}
 	IRC_WriteStrClientPrefix( target, from, "INVITE %s %s", Req->argv[0], Req->argv[1] );
-	if( remember ) Lists_AddInvited( Client_Mask( target ), chan, TRUE );
 
 	if( Client_Conn( target ) > NONE )
 	{
blob - d4b0a1430f17c8ef02ca093a80e5e312d919ff43
blob + 96a7ce64ed5f3dc050c4823149afa49e84345925
--- src/ngircd/lists.c
+++ src/ngircd/lists.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: lists.c,v 1.3 2002/06/09 13:18:23 alex Exp $
+ * $Id: lists.c,v 1.4 2002/07/15 16:35:21 alex Exp $
  *
  * lists.c: Verwaltung der "IRC-Listen": Ban, Invite, ...
  */
@@ -123,7 +123,7 @@ Lists_CheckInvited( CLIENT *Client, CHANNEL *Chan )
 } /* Lists_CheckInvited */
 
 
-GLOBAL VOID
+GLOBAL BOOLEAN
 Lists_AddInvited( CHAR *Pattern, CHANNEL *Chan, BOOLEAN OnlyOnce )
 {
 	C2C *c2c;
@@ -135,7 +135,7 @@ Lists_AddInvited( CHAR *Pattern, CHANNEL *Chan, BOOLEA
 	if( ! c2c )
 	{
 		Log( LOG_ERR, "Can't add new invite list entry!" );
-		return;
+		return FALSE;
 	}
 
 	/* verketten */
@@ -143,6 +143,7 @@ Lists_AddInvited( CHAR *Pattern, CHANNEL *Chan, BOOLEA
 	My_Invites = c2c;
 
 	Log( LOG_DEBUG, "Added \"%s\" to invite list for \"%s\".", Pattern, Channel_Name( Chan ));
+	return TRUE;
 } /* Lists_AddInvited */
 
 
blob - 366f075eb377323a18e7e66af410923e84a7b59f
blob + f00bca11e906fe9a7cf24c241d7b9754a059162b
--- src/ngircd/lists.h
+++ src/ngircd/lists.h
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: lists.h,v 1.3 2002/06/09 13:18:40 alex Exp $
+ * $Id: lists.h,v 1.4 2002/07/15 16:35:21 alex Exp $
  *
  * lists.h: Verwaltung der "IRC-Listen": Ban, Invite, ... (Header)
  */
@@ -23,7 +23,7 @@ GLOBAL VOID Lists_Init PARAMS(( VOID ));
 GLOBAL VOID Lists_Exit PARAMS(( VOID ));
 
 GLOBAL BOOLEAN Lists_CheckInvited PARAMS(( CLIENT *Client, CHANNEL *Chan ));
-GLOBAL VOID Lists_AddInvited PARAMS(( CHAR *Pattern, CHANNEL *Chan, BOOLEAN OnlyOnce ));
+GLOBAL BOOLEAN Lists_AddInvited PARAMS(( CHAR *Pattern, CHANNEL *Chan, BOOLEAN OnlyOnce ));
 
 GLOBAL BOOLEAN Lists_CheckBanned PARAMS(( CLIENT *Client, CHANNEL *Chan ));