mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
autolog: do not create *.log, send it to <your nick>.log instead
*.log resulted from server notices to * (as sent by ratbox) for example, and was subsequently interpreted as a wildcard (note that only * alone is a wildcard for log targets). Bug #533 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4645 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
0efac764f6
commit
d5ea8d7bbc
@ -460,6 +460,7 @@ 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
|
||||
we're parting the channel with /WINDOW CLOSE.. Maybe a small
|
||||
@ -469,10 +470,13 @@ static void autolog_open_check(SERVER_REC *server, const char *server_tag,
|
||||
(autolog_level & level) == 0 || target == NULL || *target == '\0')
|
||||
return;
|
||||
|
||||
deftarget = server->nick ? 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, *tmp);
|
||||
autolog_open(server, server_tag,
|
||||
strcmp(*tmp, "*") ? *tmp : deftarget);
|
||||
g_strfreev(targets);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user