From eb9f1eb9850fa1254feee9f740f525e49240fbdc Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 11 Sep 2001 17:47:31 +0000 Subject: [PATCH] autolog: target name is now always lowercased with irc protocol. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1789 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/chat-protocols.h | 1 + src/fe-common/core/fe-log.c | 4 ++++ src/irc/core/irc-core.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/core/chat-protocols.h b/src/core/chat-protocols.h index cc7eaadc..74e34151 100644 --- a/src/core/chat-protocols.h +++ b/src/core/chat-protocols.h @@ -5,6 +5,7 @@ typedef struct { int id; unsigned int not_initialized:1; + unsigned int case_insensitive:1; char *name; char *fullname; diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 94b1f0f8..e3c7a1f9 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -22,6 +22,7 @@ #include "module-formats.h" #include "signals.h" #include "commands.h" +#include "chat-protocols.h" #include "servers.h" #include "levels.h" #include "misc.h" @@ -414,6 +415,9 @@ static void autolog_open(SERVER_REC *server, const char *target) '%' -> '%%' - so strftime() won't mess with them */ fixed_target = escape_target(target); + if (CHAT_PROTOCOL(server)->case_insensitive) + g_strdown(fixed_target); + fname = parse_special_string(autolog_path, server, NULL, fixed_target, NULL, 0); g_free(fixed_target); diff --git a/src/irc/core/irc-core.c b/src/irc/core/irc-core.c index b203fe35..4de12831 100644 --- a/src/irc/core/irc-core.c +++ b/src/irc/core/irc-core.c @@ -74,6 +74,8 @@ void irc_core_init(void) rec->fullname = "Internet Relay Chat"; rec->chatnet = "ircnet"; + rec->case_insensitive = TRUE; + rec->create_chatnet = create_chatnet; rec->create_server_setup = create_server_setup; rec->create_channel_setup = create_channel_setup;