Cleanups.
This commit is contained in:
parent
a21488ead6
commit
51f5a91664
@ -362,6 +362,8 @@ logfilegroup_t *log_find_file(log_t *logdata, char *destination)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Da log routines
|
* Da log routines
|
||||||
|
* There are a lot of snprintf's here without enforcing the last \0 in the
|
||||||
|
* buffer, but _log_write takes care of this for us.
|
||||||
*/
|
*/
|
||||||
void log_join(log_t *logdata, char *ircmask, char *channel)
|
void log_join(log_t *logdata, char *ircmask, char *channel)
|
||||||
{
|
{
|
||||||
@ -374,9 +376,14 @@ void log_join(log_t *logdata, char *ircmask, char *channel)
|
|||||||
void log_part(log_t *logdata, char *ircmask, char *channel,
|
void log_part(log_t *logdata, char *ircmask, char *channel,
|
||||||
char *message)
|
char *message)
|
||||||
{
|
{
|
||||||
|
if (message)
|
||||||
snprintf(logdata->buffer, LOGLINE_MAXLEN,
|
snprintf(logdata->buffer, LOGLINE_MAXLEN,
|
||||||
"%s -!- %s has left %s [%s]", timestamp(), ircmask,
|
"%s -!- %s has left %s [%s]", timestamp(), ircmask,
|
||||||
channel, message);
|
channel, message);
|
||||||
|
else
|
||||||
|
snprintf(logdata->buffer, LOGLINE_MAXLEN,
|
||||||
|
"%s -!- %s has left %s", timestamp(), ircmask,
|
||||||
|
channel);
|
||||||
log_write(logdata, channel, logdata->buffer);
|
log_write(logdata, channel, logdata->buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user