Commit Diff


commit - 6d81286b08b8fbea5827113b55c4ef8f5e193006
commit + e62ad97937bd834a450a5a162fc80d4e93d79741
blob - c38c386b936fc46fe1227e59dfbb4b2f4f71447f
blob + f8ab651131e425881fda048fdd6398ec31f46604
--- src/ngircd/client.c
+++ src/ngircd/client.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: client.c,v 1.59 2002/06/10 21:09:39 alex Exp $
+ * $Id: client.c,v 1.60 2002/09/03 18:54:31 alex Exp $
  *
  * client.c: Management aller Clients
  *
@@ -353,7 +353,7 @@ Client_SetInfo( CLIENT *Client, CHAR *Info )
 GLOBAL VOID
 Client_SetModes( CLIENT *Client, CHAR *Modes )
 {
-	/* Hostname eines Clients setzen */
+	/* Modes eines Clients setzen */
 
 	assert( Client != NULL );
 	assert( Modes != NULL );
@@ -361,6 +361,19 @@ Client_SetModes( CLIENT *Client, CHAR *Modes )
 	strncpy( Client->modes, Modes, CLIENT_MODE_LEN - 1 );
 	Client->modes[CLIENT_MODE_LEN - 1] = '\0';
 } /* Client_SetModes */
+
+
+GLOBAL VOID
+Client_SetFlags( CLIENT *Client, CHAR *Flags )
+{
+	/* Flags eines Clients setzen */
+
+	assert( Client != NULL );
+	assert( Flags != NULL );
+
+	strncpy( Client->flags, Flags, CLIENT_FLAGS_LEN - 1 );
+	Client->modes[CLIENT_FLAGS_LEN - 1] = '\0';
+} /* Client_SetFlags */
 
 
 GLOBAL VOID
@@ -635,6 +648,14 @@ Client_Modes( CLIENT *Client )
 	assert( Client != NULL );
 	return Client->modes;
 } /* Client_Modes */
+
+
+GLOBAL CHAR *
+Client_Flags( CLIENT *Client )
+{
+	assert( Client != NULL );
+	return Client->flags;
+} /* Client_Flags */
 
 
 GLOBAL BOOLEAN
@@ -994,6 +1015,7 @@ New_Client_Struct( VOID )
 	c->token = -1;
 	c->mytoken = -1;
 	strcpy( c->away, "" );
+	strcpy( c->flags, "" );
 
 	return c;
 } /* New_Client */
blob - e7178d74f00215e5feeb256a11f5053784fea363
blob + a832a1ffe65e3b555154fd356becc22ac4824fda
--- src/ngircd/client.h
+++ src/ngircd/client.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: client.h,v 1.28 2002/05/27 13:09:26 alex Exp $
+ * $Id: client.h,v 1.29 2002/09/03 18:54:31 alex Exp $
  *
  * client.h: Konfiguration des ngircd (Header)
  */
@@ -54,6 +54,7 @@ typedef struct _CLIENT
 	INT hops, token, mytoken;	/* "Hops" und "Token" (-> SERVER-Befehl) */
 	BOOLEAN oper_by_me;		/* IRC-Operator-Status durch diesen Server? */
 	CHAR away[CLIENT_AWAY_LEN];	/* AWAY-Text, wenn Mode 'a' gesetzt */
+	CHAR flags[CLIENT_FLAGS_LEN];	/* Flags des Client (aktuell nur bei Servern) */
 } CLIENT;
 
 #else
@@ -91,6 +92,7 @@ GLOBAL CHAR *Client_User PARAMS((CLIENT *Client ));
 GLOBAL CHAR *Client_Hostname PARAMS((CLIENT *Client ));
 GLOBAL CHAR *Client_Password PARAMS((CLIENT *Client ));
 GLOBAL CHAR *Client_Modes PARAMS((CLIENT *Client ));
+GLOBAL CHAR *Client_Flags PARAMS((CLIENT *Client ));
 GLOBAL CLIENT *Client_Introducer PARAMS((CLIENT *Client ));
 GLOBAL BOOLEAN Client_OperByMe PARAMS((CLIENT *Client ));
 GLOBAL INT Client_Hops PARAMS((CLIENT *Client ));
@@ -112,6 +114,7 @@ GLOBAL VOID Client_SetHops PARAMS((CLIENT *Client, INT
 GLOBAL VOID Client_SetToken PARAMS((CLIENT *Client, INT Token ));
 GLOBAL VOID Client_SetOperByMe PARAMS((CLIENT *Client, BOOLEAN OperByMe ));
 GLOBAL VOID Client_SetModes PARAMS((CLIENT *Client, CHAR *Modes ));
+GLOBAL VOID Client_SetFlags PARAMS((CLIENT *Client, CHAR *Flags ));
 GLOBAL VOID Client_SetIntroducer PARAMS((CLIENT *Client, CLIENT *Introducer ));
 GLOBAL VOID Client_SetAway PARAMS((CLIENT *Client, CHAR *Txt ));