Cleanups.
This commit is contained in:
parent
a21488ead6
commit
51f5a91664
@ -1473,7 +1473,7 @@ static int irc_part(struct link_server *server, struct line *line)
|
|||||||
free(s_nick);
|
free(s_nick);
|
||||||
|
|
||||||
log_part(LINK(server)->log, line->origin, s_chan,
|
log_part(LINK(server)->log, line->origin, s_chan,
|
||||||
line->elemc == 3 ? line->elemv[2]:NULL);
|
line->elemc == 3 ? line->elemv[2] : NULL);
|
||||||
|
|
||||||
nick_free(nick);
|
nick_free(nick);
|
||||||
return OK_COPY;
|
return OK_COPY;
|
||||||
|
@ -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…
Reference in New Issue
Block a user