{
my $class = shift;
my $thing = {@_};
+
+ $thing->{origin} ||= $main::mycall;
bless $thing, $class;
return $thing;
push @queue, $thing;
}
+#
# this is the main commutator loop. In due course it will
-# become the *only* commutator loop
+# become the *only* commutator loop, This can be called in one
+# of two ways: either with 2 args or with none.
+#
+# The two arg form is an immediate "queue and handle" and does
+# a full cycle, immediately
+#
sub process
{
my $thing;
+ if (@_ == 2) {
+ $thing = shift;
+ $thing->queue(shift);
+ }
while (@queue) {
$thing = shift @queue;
- my $dxchan = DXChannel->get($thing->{dxchan});
+ my $dxchan = DXChannel::get($thing->{dxchan});
if ($dxchan) {
if ($thing->can('in_filter')) {
next unless $thing->in_filter($dxchan);
$dd->Quotekeys($] < 5.005 ? 1 : 0);
return $dd->Dumpxs;
}
+
+sub add_auth
+{
+ my $thing = shift;
+ my $s = $thing->{'s'} = sprintf "%X", int(rand() * 100000000);
+ my $auth = Verify->new("DXSp,$main::mycall,$s,$main::version,$main::build");
+ $thing->{auth} = $auth->challenge($main::me->user->passphrase);
+}
+
1;