diff -urNp modules.old/regcode/regcode.info modules/regcode/regcode.info
--- modules.old/regcode/regcode.info	1969-12-31 19:00:00.000000000 -0500
+++ modules/regcode/regcode.info	2007-03-28 09:36:52.250000000 -0400
@@ -0,0 +1,4 @@
+; $Id: regcode.info,v 1.1 2007/01/03 01:29:15 drewish Exp $
+name = Regcode
+description = Implement a registration code on the User Registration page.
+package = Regcode
\ No newline at end of file
diff -urNp modules.old/regcode/regcode.module modules/regcode/regcode.module
--- modules.old/regcode/regcode.module	2007-03-29 13:39:34.203125000 -0400
+++ modules/regcode/regcode.module	2007-03-29 13:31:30.375000000 -0400
@@ -9,7 +9,8 @@
 // Initial written by nevets (http://drupal.org/user/12856).
 // See http://drupal.org/node/85861 for details.
 // Edited and hacked on by colan (http://drupal.org/user/58704).
-// Updated to Drupal 5.x by kaushik_sarkar (http://drupal.org/user/95377).
+// Updated for 5.x by kaushik_sarkar (http://drupal.org/user/95377).
+// Tweaked slightly by vermi (http://drupal.org/user/114420).
 
 /**
 * Display help and module information.
@@ -78,16 +79,37 @@ return $items;
 
 function regcode_admin_settings()
 {
-$form['regcode_codes'] = array(
+$form['regcode'] = array(
+'#type' => 'fieldset',
+'#title' => t('Registration Code Setup')
+);
+
+$form['regcode']['regcode_title'] = array(
+'#type' => 'textfield',
+'#title' => t('Field Name'),
+'#required' => FALSE,
+'#default_value' => variable_get('regcode_title', t('Registration Code')),
+'#description' => t('This will change the name of the Registration Code field on the New User Registration page.')
+);
+
+$form['regcode']['regcode_desc'] = array(
+'#type' => 'textarea',
+'#title' => t('Description'),
+'#required' => FALSE,
+'#default_value' => variable_get('regcode_desc', t('Please enter your registration code.')),
+'#description' => t('Change this to customize the descriptive text new users will see beneath the Registration Code box on the New User Registration page.')
+);
+
+$form['regcode']['regcode_codes'] = array(
 '#type' => 'textarea',
 '#title' => t('Registration Code(s)'),
-'#required' => TRUE,
+'#required' => FALSE,
 '#default_value' => variable_get('regcode_codes', ''),
 '#description' => t('If set, new users must correctly enter one of these
 codes in order to register. Enter one code per line.')
 );
-$form = system_settings_form($form);
-return $form;
+
+return system_settings_form($form);
 
 }
 /**
@@ -115,17 +137,22 @@ switch ($op) {
 
 case 'register':
 // Inject the registration code field into the registration form.
-$form['regcode_code'] = array(
+$form['regcode_entry'] = array(
+'#type' => 'fieldset',
+'#title' => t('Registration Code')
+);
+
+$form['regcode_entry']['regcode_code'] = array(
 '#type' => 'textfield',
-'#title' => t('Registration Code'),
+'#title' => variable_get('regcode_title', ''),
 //'#default_value' => variable_get('regcode_codes', ''),
 '#required' => TRUE,
-'#description' => t('Please enter your registration code.')
+'#description' => variable_get('regcode_desc', '')
 );
 return $form;
 
 case 'validate':
-if ($category == 'account') {
+if (! $account->uid && $category == 'account') {
 // Make sure that the entered code is in the list.
 $regcodes = explode("\n", $regcodes);
 array_walk($regcodes, create_function('&$a', '$a = trim($a);'));
