--- /dev/null
+#
+# module to manage channel lists & data
+#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+package DXChannel;
+
+require Exporter;
+@ISA = qw(Exporter);
+
+%connects = undef;
+
+# create a new connection object [$obj = Connect->new($call, $msg_conn_obj, $user_obj)]
+sub new
+{
+ my ($pkg, $call, $conn, $user) = @_;
+ my $self = {};
+
+ die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
+ $self->{call} = $call;
+ $self->{conn} = $conn;
+ $self->{user} = $user;
+ $self->{t} = time;
+ $self->{state} = 0;
+ bless $self, $pkg;
+ return $connects{$call} = $self;
+}
+
+# obtain a connection object by callsign [$obj = Connect->get($call)]
+sub get
+{
+ my ($pkg, $call) = @_;
+ return $connect{$call};
+}
+
+# obtain all the connection objects
+sub get_all
+{
+ my ($pkg) = @_;
+ return values(%connects);
+}
+
+# obtain a connection object by searching for its connection reference
+sub get_by_cnum
+{
+ my ($pkg, $conn) = @_;
+ my $self;
+
+ foreach $self (values(%connects)) {
+ return $self if ($self->{conn} == $conn);
+ }
+ return undef;
+}
+
+# get rid of a connection object [$obj->del()]
+sub del
+{
+ my $self = shift;
+ delete $connects{$self->{call}};
+}
+
+1;
+__END__;
+++ /dev/null
-#
-# module to manage connection lists & data
-#
-
-package DXConnect;
-
-require Exporter;
-@ISA = qw(Exporter);
-
-%connects = undef;
-
-# create a new connection object [$obj = Connect->new($call, $msg_conn_obj, $user_obj)]
-sub new
-{
- my ($pkg, $call, $conn, $user) = @_;
- my $self = {};
-
- die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
- $self->{call} = $call;
- $self->{conn} = $conn;
- $self->{user} = $user;
- $self->{t} = time;
- $self->{state} = 0;
- bless $self, $pkg;
- return $connects{$call} = $self;
-}
-
-# obtain a connection object by callsign [$obj = Connect->get($call)]
-sub get
-{
- my ($pkg, $call) = @_;
- return $connect{$call};
-}
-
-# obtain all the connection objects
-sub get_all
-{
- my ($pkg) = @_;
- return values(%connects);
-}
-
-# obtain a connection object by searching for its connection reference
-sub get_by_cnum
-{
- my ($pkg, $conn) = @_;
- my $self;
-
- foreach $self (values(%connects)) {
- return $self if ($self->{conn} == $conn);
- }
- return undef;
-}
-
-# get rid of a connection object [$obj->del()]
-sub del
-{
- my $self = shift;
- delete $connects{$self->{call}};
-}
-
-1;
-__END__;
#
# DX cluster user routines
#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
package DXUser;
#
# various utilities which are exported globally
#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
package DXUtil;
# The system variables - those indicated will need to be changed to suit your
# circumstances (and callsign)
#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
package main;
#
# I have modified it to suit my devious purposes (Dirk Koopman G1TLH)
#
+# $Id$
+#
+
package Msg;
require Exporter;
#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
+# $Id$
#
use Msg;
#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
+# $Id$
#
use Msg;
use DXVars;
use DXUtil;
-use DXConnect;
+use DXChannel;
use DXUser;
package main;
sub rec
{
my ($conn, $msg, $err) = @_;
- my $dxconn = DXConnect->get_by_cnum($conn); # get the dxconnnect object for this message
+ my $dxconn = DXChannel->get_by_cnum($conn); # get the dxconnnect object for this message
if (defined $err && $err) {
disconnect($dxconn);
sub cease
{
my $dxconn;
- foreach $dxconn (DXConnect->get_all()) {
+ foreach $dxconn (DXChannel->get_all()) {
disconnect($dxconn);
}
}
+#
+# This allows perl programs to call functions dynamically
+#
+# This has been nicked directly from the perlembed pages
+# so has the perl copyright
+#
+# $Id$
+#
+
package Embed::Persistent;
#persistent.pl