summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-04 04:27:45 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-04 04:27:45 +0000
commitcf8323634699c3dc9db670f2570179951152b6b3 (patch)
tree82e60b9fa41c4d8558f6f0983fbaf829e61a5027 /src/core
parent82b0c081e24aead76699167753c657f6fe983252 (diff)
downloadirssi-cf8323634699c3dc9db670f2570179951152b6b3.zip
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
Diffstat (limited to 'src/core')
-rw-r--r--src/core/log.c7
-rw-r--r--src/core/log.h2
2 files changed, 4 insertions, 5 deletions
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);