From cf8323634699c3dc9db670f2570179951152b6b3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 4 Feb 2002 04:27:45 +0000 Subject: printtext(): you can now specify server target with tag name instead of record. This is useful with DCC chats when you know the initial server tag but the server might be already disconnected. So what this means is that you now get ~/irclogs/ircnet/=nick.log instead of ~/irclogs/=nick.log :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2388 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/log.c | 7 +++---- src/core/log.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/log.c b/src/core/log.c index ccad07ca..e843ffe7 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -257,11 +257,11 @@ LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item, return NULL; } -void log_file_write(SERVER_REC *server, const char *item, int level, +void log_file_write(const char *server_tag, const char *item, int level, const char *str, int no_fallbacks) { GSList *tmp, *fallbacks; - char *tmpstr, *servertag; + char *tmpstr; int found; g_return_if_fail(str != NULL); @@ -269,7 +269,6 @@ void log_file_write(SERVER_REC *server, const char *item, int level, if (logs == NULL) return; - servertag = server == NULL ? NULL : server->tag; fallbacks = NULL; found = FALSE; for (tmp = logs; tmp != NULL; tmp = tmp->next) { @@ -285,7 +284,7 @@ void log_file_write(SERVER_REC *server, const char *item, int level, fallbacks = g_slist_append(fallbacks, rec); else if (item != NULL && log_item_find(rec, LOG_ITEM_TARGET, item, - servertag) != NULL) + server_tag) != NULL) log_write_rec(rec, str, level); } diff --git a/src/core/log.h b/src/core/log.h index 7bee63d3..6ada7c65 100644 --- a/src/core/log.h +++ b/src/core/log.h @@ -48,7 +48,7 @@ void log_item_destroy(LOG_REC *log, LOG_ITEM_REC *item); LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item, const char *servertag); -void log_file_write(SERVER_REC *server, const char *item, int level, +void log_file_write(const char *server_tag, const char *item, int level, const char *str, int no_fallbacks); void log_write_rec(LOG_REC *log, const char *str, int level); -- cgit v1.2.3