commit - 51d09fb4f7a454c86012abe52532d6383bea11d5
commit + 85acb82469f433c028d151344e2a68f654c84798
blob - b0aec128abd0ef80cae946fb78e6448f0b439d6f
blob + ec66ee5383402b896099263e121707edd4f4328a
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-info.c,v 1.24 2005/01/24 14:19:04 alex Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.25 2005/02/04 13:15:38 alex Exp $";
#include "imp.h"
#include <assert.h>
ptr = strtok( NULL, " " );
}
}
- if( rpl[strlen( rpl ) - 1] == ' ' ) rpl[strlen( rpl ) - 1] = '\0';
+ ngt_TrimLastChr(rpl, ' ');
return IRC_WriteStrClient( Client, rpl, Client_ID( Client ) );
} /* IRC_ISON */
strlcat( rpl, " ", sizeof( rpl ));
}
}
- if( rpl[strlen( rpl ) - 1] == ' ' ) rpl[strlen( rpl ) - 1] = '\0';
+ ngt_TrimLastChr( rpl, ' ');
return IRC_WriteStrClient( Client, rpl, Client_ID( Client ) );
} /* IRC_USERHOST */
BOOLEAN ok;
CHAR line[127];
FILE *fd;
- UINT line_len;
assert( Client != NULL );
{
if( ! fgets( line, sizeof( line ), fd )) break;
- line_len = strlen( line );
- if( line_len > 0 ) line_len--;
- if( line[line_len] == '\n' ) line[line_len] = '\0';
+ ngt_TrimLastChr( line, '\n');
if( ! IRC_WriteStrClient( Client, RPL_MOTD_MSG, Client_ID( Client ), line ))
{