diff --git a/samples/bip.conf b/samples/bip.conf index 68e6976..c89dae3 100644 --- a/samples/bip.conf +++ b/samples/bip.conf @@ -37,7 +37,7 @@ log_level = 3; # %m -> 2 digit month # %d -> 2 digit day # %c -> destination (#chan, privates, ...) -#log_format = "%n/%Y-%m/%c.%d.log"; +#log_format = "%u/%n/%Y-%m/%c.%d.log"; # Sets the frequency (in seconds) of log syncing (real write to kernel) #log_sync_interval = 5; diff --git a/src/bip.c b/src/bip.c index ba1192c..89f1e08 100644 --- a/src/bip.c +++ b/src/bip.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include "irc.h" @@ -704,6 +705,9 @@ static int validate_config(bip_t *bip) } } + if (strstr(conf_log_format, "\%u") == NULL) + mylog(LOG_WARN, "log_format doesn't contain \%u, all users'" + " logs will be mixed !"); return r; } diff --git a/src/util.c b/src/util.c index 32b5c49..74f35bf 100644 --- a/src/util.c +++ b/src/util.c @@ -42,7 +42,7 @@ int is_valid_nick(char *str) while (*tmp != '\0' && (isalnum(*tmp) || *tmp == '-' || *tmp == '[' || *tmp == ']' || *tmp == '\\' || *tmp == '`' || *tmp == '^' || *tmp == '{' || *tmp == '}' || - *tmp == '|')) + *tmp == '|' || *tmp == '_' )) tmp++; return (*tmp == '\0'); }