mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
$1 can now be used as server tag in /SET autolog_path. This is useful when
you want to log for specified tag before the server exists yet so $tag wouldn't work. This happens at least when queries print the "querying nick" text at startup. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2622 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
665ad121a8
commit
ee3a30e16b
@ -407,7 +407,7 @@ static void autolog_open(SERVER_REC *server, const char *server_tag,
|
|||||||
const char *target)
|
const char *target)
|
||||||
{
|
{
|
||||||
LOG_REC *log;
|
LOG_REC *log;
|
||||||
char *fname, *dir, *fixed_target;
|
char *fname, *dir, *fixed_target, *params;
|
||||||
|
|
||||||
log = logs_find_item(LOG_ITEM_TARGET, target, server_tag, NULL);
|
log = logs_find_item(LOG_ITEM_TARGET, target, server_tag, NULL);
|
||||||
if (log != NULL && !log->failed) {
|
if (log != NULL && !log->failed) {
|
||||||
@ -423,10 +423,14 @@ static void autolog_open(SERVER_REC *server, const char *server_tag,
|
|||||||
if (CHAT_PROTOCOL(server)->case_insensitive)
|
if (CHAT_PROTOCOL(server)->case_insensitive)
|
||||||
g_strdown(fixed_target);
|
g_strdown(fixed_target);
|
||||||
|
|
||||||
fname = parse_special_string(autolog_path, server, NULL,
|
/* $0 = target, $1 = server tag */
|
||||||
fixed_target, NULL, 0);
|
params = g_strconcat(fixed_target, " ", server_tag, NULL);
|
||||||
g_free(fixed_target);
|
g_free(fixed_target);
|
||||||
|
|
||||||
|
fname = parse_special_string(autolog_path, server, NULL,
|
||||||
|
params, NULL, 0);
|
||||||
|
g_free(params);
|
||||||
|
|
||||||
if (log_find(fname) == NULL) {
|
if (log_find(fname) == NULL) {
|
||||||
log = log_create_rec(fname, autolog_level);
|
log = log_create_rec(fname, autolog_level);
|
||||||
if (!settings_get_bool("autolog_colors"))
|
if (!settings_get_bool("autolog_colors"))
|
||||||
|
Loading…
Reference in New Issue
Block a user