version 1.141, 2003/09/08 10:32:07
|
version 1.142, 2003/09/09 20:47:46
|
Line 60
|
Line 60
|
# 09/08/2003 Ron Fox: Told lond to take care of change logging so we |
# 09/08/2003 Ron Fox: Told lond to take care of change logging so we |
# don't have to remember it: |
# don't have to remember it: |
# $Log$ |
# $Log$ |
|
# Revision 1.142 2003/09/09 20:47:46 www |
|
# Permanently store chatroom entries in chatroom.log |
|
# |
# Revision 1.141 2003/09/08 10:32:07 foxr |
# Revision 1.141 2003/09/08 10:32:07 foxr |
# Added PushFile sub This sub oversees the push of a new configuration table file |
# Added PushFile sub This sub oversees the push of a new configuration table file |
# Currently supported files are: |
# Currently supported files are: |
Line 2043 sub chatadd {
|
Line 2046 sub chatadd {
|
my %hash; |
my %hash; |
my $proname=&propath($cdom,$cname); |
my $proname=&propath($cdom,$cname); |
my @entries=(); |
my @entries=(); |
|
my $time=time; |
if (tie(%hash,'GDBM_File',"$proname/nohist_chatroom.db", |
if (tie(%hash,'GDBM_File',"$proname/nohist_chatroom.db", |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
@entries=map { $_.':'.$hash{$_} } sort keys %hash; |
@entries=map { $_.':'.$hash{$_} } sort keys %hash; |
my $time=time; |
|
my ($lastid)=($entries[$#entries]=~/^(\w+)\:/); |
my ($lastid)=($entries[$#entries]=~/^(\w+)\:/); |
my ($thentime,$idnum)=split(/\_/,$lastid); |
my ($thentime,$idnum)=split(/\_/,$lastid); |
my $newid=$time.'_000000'; |
my $newid=$time.'_000000'; |
Line 2066 sub chatadd {
|
Line 2069 sub chatadd {
|
} |
} |
untie %hash; |
untie %hash; |
} |
} |
|
{ |
|
my $hfh; |
|
if ($hfh=IO::File->new(">>$proname/chatroom.log")) { |
|
print $hfh "$time:".&unescape($newchat)."\n"; |
|
} |
|
} |
} |
} |
|
|
sub unsub { |
sub unsub { |