-$usercount = (have_option('u', 'users')) ? get_option_value('u', 'users') : 100;
-$noticeavg = (have_option('n', 'notices')) ? get_option_value('n', 'notices') : 100;
-$subsavg = (have_option('b', 'subscriptions')) ? get_option_value('b', 'subscriptions') : max($usercount/20, 10);
-$tagmax = (have_option('t', 'tags')) ? get_option_value('t', 'tags') : 10000;
-$userprefix = (have_option('x', 'prefix')) ? get_option_value('x', 'prefix') : 'testuser';
+$defaultWordsfile = '/usr/share/dict/words';
+
+$usercount = (have_option('u', 'users')) ? get_option_value('u', 'users') : 100;
+$groupcount = (have_option('g', 'groups')) ? get_option_value('g', 'groups') : 20;
+$noticeavg = (have_option('n', 'notices')) ? get_option_value('n', 'notices') : 100;
+$subsavg = (have_option('b', 'subscriptions')) ? get_option_value('b', 'subscriptions') : max($usercount/20, 10);
+$joinsavg = (have_option('j', 'joins')) ? get_option_value('j', 'joins') : 5;
+//$favesavg = (have_option('f', 'faves')) ? get_option_value('f', 'faves') : max($noticeavg/10, 5);
+$messageavg = (have_option('m', 'messages')) ? get_option_value('m', 'messages') : max($noticeavg/10, 5);
+$tagmax = (have_option('t', 'tags')) ? get_option_value('t', 'tags') : 10000;
+$userprefix = (have_option('x', 'prefix')) ? get_option_value('x', 'prefix') : 'testuser';
+$groupprefix = (have_option('z', 'groupprefix')) ? get_option_value('z', 'groupprefix') : 'testgroup';
+$wordsfile = (have_option('w', 'words')) ? get_option_value('w', 'words') : $defaultWordsfile;
+
+if (is_readable($wordsfile)) {
+ $words = file($wordsfile);
+} else {
+ if ($wordsfile != $defaultWordsfile) {
+ // user specified words file couldn't be read
+ throw new Exception("Couldn't read words file: {$wordsfile}.");
+ }
+ $words = null;
+}