From 630af0ed6c0af69c7df2e45aef7a87722a3c00c0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:47 +0200 Subject: tagging ychat-perl-legacy --- 0.7.6/modules/webchat.pm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 0.7.6/modules/webchat.pm (limited to '0.7.6/modules/webchat.pm') diff --git a/0.7.6/modules/webchat.pm b/0.7.6/modules/webchat.pm new file mode 100644 index 0000000..90f8731 --- /dev/null +++ b/0.7.6/modules/webchat.pm @@ -0,0 +1,22 @@ +sub webchat { + my @rooms = &diropen('data/online/rooms'); + my $output; + + foreach my $room (@rooms) { + next if ($room =~ /\./); + my @users = &diropen("data/online/rooms/$room") or print "$!\n"; + + foreach my $user (@users) { + next if ($user =~ /\./); + open FILE, "data/online/rooms/$room/$user"; + my $timestamp = ; + close FILE; + chomp $timestamp; + + $output = $output . "($user)($timestamp)($room)\n"; + } + } + + print $output; +} +1; -- cgit v1.2.3