--- wordfilter.module	2008-01-02 01:44:36.000000000 +0800
+++ wordfilter.module	2008-03-06 15:21:43.000000000 +0800
@@ -102,6 +102,13 @@ function wordfilter_settings_form() {
     "#return_value" => true
   );
 
+  $form["wordfilter_comment_title"] = array(
+    "#type" => "checkbox",
+    "#title" => t("Enable Word Filtering On Comment Titles"),
+    "#default_value" => variable_get("wordfilter_comment_title", true),
+    "#return_value" => true
+  );
+
   return system_settings_form($form);
 }
 
@@ -128,6 +135,21 @@ function wordfilter_nodeapi(&$node, $op,
 }
 
 /**
+ * Implementation of hook_comment().
+ *
+ * @param &$comment
+ *   editable comment array/object or comment form
+ *
+ * @param $op
+ *   string for operation type
+ */
+function wordfilter_comment(&$comment, $op) {
+  if ($comment && ($op == 'insert' || $op == 'update') && variable_get("wordfilter_comment_title", true)) {
+    db_query("UPDATE {comments} SET subject = '%s' WHERE cid = %d", wordfilter_filter_process($comment['subject']), $comment['cid']);
+  }
+}
+
+/**
  * Implementation of hook_block().
  *
  * @param $op
