### 書き込み
if ($mode eq "write") {
$name = $noname if ($name =~ /^\s*$/sm);
+ ##### スパム対策 2006/08/19
+ ##### http://www.pochi.cc/~sasaki/chalow/2006-01-25-2.html
+ # anti spam
+ if (($body ne "") && ($body !~ m/[\x80-\xff]/)) {die('error')};
+ #####
if ($body !~ /\A\s*\Z/m) {
escape_string(\$name);
escape_string(\$mail_or_url);
escape_string(\$body);
$body =~ s/\r?\n/<br>/gsm;
my $name_tmp = $name;
if ($mail_or_url =~ /^http:\/\/$URLCHARS+$/) {
$name_tmp = qq(<a href="$mail_or_url">$name</a>);
}
$latest_id++;
$com_hash{$latest_id}{n} = $name_tmp;
$com_hash{$latest_id}{m} = $body;
$com_hash{$latest_id}{d} = $what_time_is_it_now;
+ ##### スパム対策 2006/08/19
+ exit if (length($body) > 1000); # spam
+ #####
write_to_logfile(); # ログファイルへの書き込み
write_to_jsfile($fn_pref.".js"); # JavaScript Feed ファイルへの書き込み
write_to_rssfile(); # RSS ファイルへの書き込み
write_to_adminlogfile(); # 管理者用ログファイルへの書き込み
}
}