is_valid_nick fix. small validate_config fix
This commit is contained in:
parent
ec68655ccd
commit
0876e783f3
|
@ -37,7 +37,7 @@ log_level = 3;
|
||||||
# %m -> 2 digit month
|
# %m -> 2 digit month
|
||||||
# %d -> 2 digit day
|
# %d -> 2 digit day
|
||||||
# %c -> destination (#chan, privates, ...)
|
# %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)
|
# Sets the frequency (in seconds) of log syncing (real write to kernel)
|
||||||
#log_sync_interval = 5;
|
#log_sync_interval = 5;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include "irc.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;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ int is_valid_nick(char *str)
|
||||||
while (*tmp != '\0' && (isalnum(*tmp) || *tmp == '-' || *tmp == '[' ||
|
while (*tmp != '\0' && (isalnum(*tmp) || *tmp == '-' || *tmp == '[' ||
|
||||||
*tmp == ']' || *tmp == '\\' || *tmp == '`' ||
|
*tmp == ']' || *tmp == '\\' || *tmp == '`' ||
|
||||||
*tmp == '^' || *tmp == '{' || *tmp == '}' ||
|
*tmp == '^' || *tmp == '{' || *tmp == '}' ||
|
||||||
*tmp == '|'))
|
*tmp == '|' || *tmp == '_' ))
|
||||||
tmp++;
|
tmp++;
|
||||||
return (*tmp == '\0');
|
return (*tmp == '\0');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user