Added support for anonymous name generator to be a function in addition to being an array of names

This commit is contained in:
Benjamin Southall 2016-12-16 05:25:26 +09:00
parent b14d12bc0b
commit 302a27742a

View File

@ -314,8 +314,12 @@ function loadConfig() {
Cache::set('events_'.$boardsuffix, $events);
}
if (is_array($config['anonymous']))
if (is_array($config['anonymous'])) {
$config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])];
}
else if (is_callable($config['anonymous'])){
$config['anonymous'] = $config['anonymous']($boardsuffix);
}
if ($config['debug']) {
if (!isset($debug)) {