pellmellの日記: さらにバグ取り
日記 by
pellmell
Index: pref.cgi
===================================================================
RCS file: /home/kagiri/cvs/czc/pref.cgi,v
retrieving revision 1.8
diff -u -r1.8 pref.cgi
--- pref.cgi 2001/09/01 02:32:16 1.8
+++ pref.cgi 2001/09/05 12:45:41
@@ -16,8 +16,9 @@
$body='<BODY>';
$max = 50;#ログの最大行数
@taboo = ('嘘');
-#$host = &gethost;if($host=~/bmc/){$host="ppp753.master.ad.jp";}
-$host=$ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'};
+$taboo_endpage = 'http://www.nt.sakura.ne.jp/~yumesaki/caizell/index.html';
+$host = &gethost;if($host=~/bmc/){$host="ppp753.master.ad.jp";}
+#$host=$ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'};
$metacode = '<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=x-sjis">';#SJIS認識させる
####アクセス制限を使用するなら、#を消す。
#$kill_file = './kill.dat';#アクセス制限用
@@ -106,7 +107,8 @@
open(DB,"$chat_file") || &ended('$chat_file open error');
seek(DB,0,0); @lines = <DB>; close(DB);
foreach (@lines){
- $_ = &decrypt($_);
+ chomp;
+ $_ = &decrypt($_);
}
}#readlog END
@@ -115,7 +117,7 @@
(@lines < $max-1) || (@lines = @lines[0 .. $max - 2]);
unshift( @lines,$value);
foreach (@lines){
- $_ = &encrypt($_);
+ $_ = &encrypt($_)."\n";
}
open(DB,">$chat_file") || &ended('$chat_file write error');
eval 'flock(DB,2);';
===================================================================
RCS file: /home/kagiri/cvs/czc/pref.cgi,v
retrieving revision 1.8
diff -u -r1.8 pref.cgi
--- pref.cgi 2001/09/01 02:32:16 1.8
+++ pref.cgi 2001/09/05 12:45:41
@@ -16,8 +16,9 @@
$body='<BODY>';
$max = 50;#ログの最大行数
@taboo = ('嘘');
-#$host = &gethost;if($host=~/bmc/){$host="ppp753.master.ad.jp";}
-$host=$ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'};
+$taboo_endpage = 'http://www.nt.sakura.ne.jp/~yumesaki/caizell/index.html';
+$host = &gethost;if($host=~/bmc/){$host="ppp753.master.ad.jp";}
+#$host=$ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'};
$metacode = '<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=x-sjis">';#SJIS認識させる
####アクセス制限を使用するなら、#を消す。
#$kill_file = './kill.dat';#アクセス制限用
@@ -106,7 +107,8 @@
open(DB,"$chat_file") || &ended('$chat_file open error');
seek(DB,0,0); @lines = <DB>; close(DB);
foreach (@lines){
- $_ = &decrypt($_);
+ chomp;
+ $_ = &decrypt($_);
}
}#readlog END
@@ -115,7 +117,7 @@
(@lines < $max-1) || (@lines = @lines[0 .. $max - 2]);
unshift( @lines,$value);
foreach (@lines){
- $_ = &encrypt($_);
+ $_ = &encrypt($_)."\n";
}
open(DB,">$chat_file") || &ended('$chat_file write error');
eval 'flock(DB,2);';