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
This commit is contained in:
Timo Sirainen 2002-02-04 04:27:45 +00:00 committed by cras
commit cf83236346
8 changed files with 118 additions and 56 deletions

View file

@ -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);
}

View file

@ -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);