state = "spam"; module::incr_var("comment", "spam_caught"); break; case "ham": $comment->state = "published"; break; case "unknown": $comment->state = "unpublished"; break; } $comment->save(); } static function comment_updated($comment) { if (!module::get_var("akismet", "api_key")) { return; } if ($comment->original("state") != "spam" && $comment->state == "spam") { akismet::submit_spam($new); } else if ($comment->original("state") == "spam" && $comment->state != "spam") { akismet::submit_ham($new); } } }