diff options
author | Alexander Færøy <ahf@irssi.org> | 2009-02-09 17:51:24 +0000 |
---|---|---|
committer | ahf <ahf@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-02-09 17:51:24 +0000 |
commit | f53f106dc69f1468e88f2d4cc8ae57024730523a (patch) | |
tree | bb6a02268a8ca5cbe552497733980310ac9d3134 /src/fe-common | |
parent | 2fffcf5a77167e03e267664e559267c8fa1d972d (diff) | |
download | irssi-f53f106dc69f1468e88f2d4cc8ae57024730523a.zip |
Don't tokenizee target since it wont contain more than one entry anyway.
Poke me if this breaks for you.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5005 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-log.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index ed1d4d7d..dbeede7b 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -460,7 +460,6 @@ static void autolog_open(SERVER_REC *server, const char *server_tag, static void autolog_open_check(SERVER_REC *server, const char *server_tag, const char *target, int level) { - char **targets, **tmp; const char *deftarget; /* FIXME: kind of a kludge, but we don't want to reopen logs when @@ -473,19 +472,14 @@ static void autolog_open_check(SERVER_REC *server, const char *server_tag, deftarget = server ? server->nick : "unknown"; - /* there can be multiple targets separated with comma */ - targets = g_strsplit(target, ",", -1); - for (tmp = targets; *tmp != NULL; tmp++) - autolog_open(server, server_tag, - strcmp(*tmp, "*") ? *tmp : deftarget); - g_strfreev(targets); + if (target != NULL) + autolog_open(server, server_tag, strcmp(target, "*") ? target : deftarget); } static void log_single_line(WINDOW_REC *window, const char *server_tag, const char *target, int level, const char *text) { char windownum[MAX_INT_STRLEN]; - char **targets, **tmp; LOG_REC *log; if (window != NULL) { @@ -497,15 +491,7 @@ static void log_single_line(WINDOW_REC *window, const char *server_tag, log_write_rec(log, text, level); } - if (target == NULL) - log_file_write(server_tag, NULL, level, text, FALSE); - else { - /* there can be multiple items separated with comma */ - targets = g_strsplit(target, ",", -1); - for (tmp = targets; *tmp != NULL; tmp++) - log_file_write(server_tag, *tmp, level, text, FALSE); - g_strfreev(targets); - } + log_file_write(server_tag, target, level, text, FALSE); } static void log_line(TEXT_DEST_REC *dest, const char *text) |