Autologging fixes: Don't log WHOIS replies by default

(autolog_level = all -crap). And with /msg nick1,nick2 don't log to
file nick1,nick2.log but nick1.log and nick2.log separately.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@585 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-11 20:13:49 +00:00 committed by cras
commit 82d272799c
2 changed files with 26 additions and 6 deletions

View file

@ -347,13 +347,24 @@ static void sig_printtext_stripped(void *window, void *server,
const char *item, gpointer levelp,
const char *str)
{
char **items, **tmp;
int level;
g_return_if_fail(str != NULL);
level = GPOINTER_TO_INT(levelp);
if (logs != NULL && level != MSGLEVEL_NEVER)
log_file_write(item, level, str, FALSE);
if (logs == NULL || level == MSGLEVEL_NEVER)
return;
if (item == NULL)
log_file_write(NULL, level, str, FALSE);
else {
/* there can be multiple items separated with comma */
items = g_strsplit(item, ",", -1);
for (tmp = items; *tmp != NULL; tmp++)
log_file_write(*tmp, level, str, FALSE);
g_strfreev(items);
}
}
static int sig_rotate_check(void)