From 7a3a8aa2a521f752a042ede37b81125689aa0067 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Mon, 16 Sep 2019 19:42:04 +0100 Subject: Make all log filenames lowercase - since IRC nicks and channel names are case-insensitive, we can ensure a nick/channel with varying case always ends up in the same log file. --- functions.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functions.c') diff --git a/functions.c b/functions.c index 58be95f..730819f 100644 --- a/functions.c +++ b/functions.c @@ -1583,3 +1583,10 @@ void stripprefixesfromnick(char *nick) { // Copy back to source string strcpy(nick, nicktmp); } + +// Convert the given 'string' into lowercase +void strlower(char *string) { + for (int i = 0; string[i]; i++) { + string[i] = tolower(string[i]); + } +} -- cgit v1.2.3