Index: captcha.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/captcha/captcha.module,v
retrieving revision 1.24
diff -u -F^f -r1.24 captcha.module
--- captcha.module	19 May 2006 15:00:51 -0000	1.24
+++ captcha.module	14 Oct 2006 00:00:16 -0000
@@ -22,17 +22,7 @@ function captcha_help($section = "admin/
 function captcha_settings() {
 
   //this is where you can add more captcha points
-  $captcha_points = array(
-                      'comment_form' => t('Comment Form'),
-                      'user_login' => t('User Login Form'),
-                      'user_login_block' => t('User Login Form Block'),
-                      'user_edit' => t('User Edit Form'),
-                      'user_register' => t('User Registration Form'),
-                      'user_pass' => t('User Forgot Password Form'),
-                      'contact_mail_user' => t('User Contact Form'),
-                      'contact_mail_page' => t('Sitewide Contact Form'),
-                      'node_form' => t('Create a node'),
-                    );
+  $captcha_points = module_invoke_all('captchapoint');
 
   $roles = user_roles();
 
@@ -138,7 +128,8 @@ function captcha_captchachallenge(&$form
   $captcha = ($x + $y) . '';
   $form['captcha_response'] = array (
     '#type' => 'textfield',
-    '#title' => t('Math Question: What is %problem?', array('%problem' => $x .' + '. $y)),
+    '#title' => t('Math Question: What is %problem?', array('%problem' => $x .' + '. $y)),
+
     '#defaultvalue' => '',
     '#description' => t('Please solve the math problem above and type in the result. e.g. for 1+1, type 2'),
     '#weight' => 0,
@@ -159,4 +150,23 @@ function captcha_captchavalidate(&$captc
   }
 }
 
-?>
+/*
+ * Implementation of hook_capthcapoint, identifies form_id's to add captchas
+ * for display on the settings page. Captcha.module has no forms itself, but
+ * implements the form_ids for core modules that may need captcha-ing.
+ */
+function captcha_captchapoint() {
+  // include core points here
+  $captcha_points = array(
+                      'comment_form' => t('Comment Form'),
+                      'user_login' => t('User Login Form'),
+                      'user_login_block' => t('User Login Form Block'),
+                      'user_edit' => t('User Edit Form'),
+                      'user_register' => t('User Registration Form'),
+                      'user_pass' => t('User Forgot Password Form'),
+                      'contact_mail_user' => t('User Contact Form'),
+                      'contact_mail_page' => t('Sitewide Contact Form'),
+                      'node_form' => t('Create a node'),
+                    );
+  return $captcha_points;
+}
\ No newline at end of file
