about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2003-01-08 22:03:21 +0000
committerAlexander Barton <alex@barton.de>2003-01-08 22:03:21 +0000
commit51e1a2e04a472d658e15f605da1daa51c6cd9bd3 (patch)
tree06fbfbe51f0ed0879d411606044433a2432d3fce
parentb8a3178a1b99425eafd06c5d26c22594ba687416 (diff)
downloadngircd-51e1a2e04a472d658e15f605da1daa51c6cd9bd3.tar.gz
ngircd-51e1a2e04a472d658e15f605da1daa51c6cd9bd3.zip
- Changed semantics of Client_SetAway().
-rw-r--r--src/ngircd/client.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 9d736d49..bea728b9 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: client.c,v 1.71 2002/12/26 17:14:48 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.72 2003/01/08 22:03:21 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -387,23 +387,13 @@ Client_SetPassword( CLIENT *Client, CHAR *Pwd )
 GLOBAL VOID
 Client_SetAway( CLIENT *Client, CHAR *Txt )
 {
-	/* Von einem Client gelieferte AWAY-Nachricht */
+	/* Set AWAY reason of client */
 
 	assert( Client != NULL );
+	assert( Txt != NULL );
 
-	if( Txt )
-	{
-		/* Client AWAY setzen */
-		strlcpy( Client->away, Txt, sizeof( Client->away ));
-		Client_ModeAdd( Client, 'a' );
-		Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
-	}
-	else
-	{
-		/* AWAY loeschen */
-		Client_ModeDel( Client, 'a' );
-		Log( LOG_DEBUG, "User \"%s\" is no longer away.", Client_Mask( Client ));
-	}
+	strlcpy( Client->away, Txt, sizeof( Client->away ));
+	Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
 } /* Client_SetAway */