is_valid_nick fix. small validate_config fix

This commit is contained in:
Loïc Gomez 2007-11-14 22:03:58 +01:00 committed by Arnaud Cornet
parent ec68655ccd
commit 0876e783f3
3 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -17,6 +17,7 @@
#include <unistd.h>
#include <signal.h>
#include <stdarg.h>
#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
#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;
}

View File

@ -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');
}