K records only come from $mycall
[spider.git] / perl / DXXml / IM.pm
1 #
2 # XML IM handler (Chat, Announces, Talk)
3 #
4 #
5 #
6 # Copyright (c) Dirk Koopman, G1TLH
7 #
8
9 use strict;
10
11 package DXXml::IM;
12
13 use DXDebug;
14 use DXProt;
15 use IsoTime;
16 use Time::HiRes qw(gettimeofday tv_interval);
17
18 use vars qw(@ISA);
19 @ISA = qw(DXXml);
20
21 #
22 # This is the general purpose IM sentence
23 #
24 # It is of the form: <chat [to=<user call>|<node call>|<chat group>] ...>the text</chat>
25 #
26 # This covers:
27 #
28 #     announce/full        (no to=)
29 #     announce/local       (to="$mycall")
30 #     announce/<node call> (to="<node call>")
31 #     chat <group>         (to="<group>")
32 #     talk <user call>     (to="<user call>")
33
34
35 sub handle_input
36 {
37         my $self = shift;
38         my $dxchan = shift;
39         
40         if ($self->{to} eq $main::mycall) {
41
42         } else {
43                 $self->route($dxchan);
44         }
45 }
46
47 sub topcxx
48 {
49         my $self = shift;
50         unless (exists $self->{'-pcxx'}) {
51                 if (my $to = $self->{to}) {
52                         if (Route::Node::get($to)) {
53                                 
54                         }
55                 }
56                 $self->{'-pcxx'} = DXProt::pc51($self->{to}, $self->{o}, $self->{s});
57         }
58         return $self->{'-pcxx'};
59 }
60
61 1;