# $File: //depot/OurNet-BBS/BBS/RAM/Session.pm $ $Author: autrijus $
# $Revision: #2 $ $Change: 1662 $ $DateTime: 2001/09/02 05:54:09 $

package OurNet::BBS::RAM::Session;

use strict;
use fields qw/recno chatport _ego _hash/;

use OurNet::BBS::Base (
    'SessionGroup' => [qw/@packlist/],
);

sub refresh_meta {
    my ($self, $key) = @_;

    # XXX SESSION READ
}

sub refresh_chat {
    my $self = shift;

    # XXX SESSION CHAT
}

sub remove {
    my $self = shift;

    # XXX SESSION REMOVE
}

sub STORE {
    my ($self, $key, $value) = @_;

    if ($key eq 'msg') {
        # XXX SESSION MSG
	}
    elsif ($key eq 'cb_msg') {
        # XXX SESSION CALLBACK
    }

    $self->refresh_meta($key);
    $self->{_hash}{$key} = $value;

    return unless $self->contains($key);
    # XXX SESSION UPDATE
}

sub DESTROY {
    my $self = shift;

    # XXX SESSION DESTROY
    return unless $self->{_hash}{flag};
}

1;
