1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-04-21 10:13:15 +00:00

- Removed strl[cat|cpy]() function calls ...

This commit is contained in:
Alexander Barton 2003-01-08 23:13:45 +00:00
parent 33927ee854
commit 84efd5e969
2 changed files with 9 additions and 8 deletions

View File

@ -17,7 +17,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: client.c,v 1.65.2.2 2003/01/08 23:09:04 alex Exp $";
static char UNUSED id[] = "$Id: client.c,v 1.65.2.3 2003/01/08 23:13:45 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -399,7 +399,8 @@ Client_SetAway( CLIENT *Client, CHAR *Txt )
assert( Client != NULL );
assert( Txt != NULL );
strlcpy( Client->away, Txt, sizeof( Client->away ));
strncpy( Client->away, Txt, CLIENT_AWAY_LEN - 1 );
Client->away[CLIENT_AWAY_LEN - 1] = '\0';
Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
} /* Client_SetAway */

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.2 2003/01/08 23:08:12 alex Exp $";
static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.3 2003/01/08 23:13:45 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -252,7 +252,7 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
if( ! Channel_IsMemberOf( Channel, Origin )) return IRC_WriteStrClient( Origin, RPL_CHANNELMODEIS_MSG, Client_ID( Origin ), Channel_Name( Channel ), Channel_Modes( Channel ));
/* The sender is a member: generate extended reply */
strlcpy( the_modes, Channel_Modes( Channel ), sizeof( the_modes ));
strcpy( the_modes, Channel_Modes( Channel ));
mode_ptr = the_modes;
strcpy( the_args, "" );
while( *mode_ptr )
@ -261,16 +261,16 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
{
case 'l':
snprintf( argadd, sizeof( argadd ), " %ld", Channel_MaxUsers( Channel ));
strlcat( the_args, argadd, sizeof( the_args ));
strcat( the_args, argadd );
break;
case 'k':
strlcat( the_args, " ", sizeof( the_args ));
strlcat( the_args, Channel_Key( Channel ), sizeof( the_args ));
strcat( the_args, " " );
strcat( the_args, Channel_Key( Channel ));
break;
}
mode_ptr++;
}
if( the_args[0] ) strlcat( the_modes, the_args, sizeof( the_modes ));
if( the_args[0] ) strcat( the_modes, the_args );
return IRC_WriteStrClient( Origin, RPL_CHANNELMODEIS_MSG, Client_ID( Origin ), Channel_Name( Channel ), the_modes );
}