]> www.dxcluster.org Git - spider.git/blob - perl/DXXml/IM.pm
try to fix the gtkconsole CVS version no
[spider.git] / perl / DXXml / IM.pm
1 #
2 # XML IM handler (Chat, Announces, Talk)
3 #
4 # $Id$
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 Investigate;
17 use Time::HiRes qw(gettimeofday tv_interval);
18
19 use vars qw(@ISA %pings);
20 @ISA = qw(DXXml);
21
22 #
23 # This is the general purpose IM sentence
24 #
25 # It is of the form: <chat [to=<user call>|<node call>|<chat group>] ...>the text</chat>
26 #
27 # This covers:
28 #
29 #     announce/full        (no to=)
30 #     announce/local       (to="$mycall")
31 #     announce/<node call> (to="<node call>")
32 #     chat <group>         (to="<group>")
33 #     talk <user call>     (to="<user call>")
34
35
36 sub handle_input
37 {
38         my $self = shift;
39         my $dxchan = shift;
40         
41         if ($self->{to} eq $main::mycall) {
42
43         } else {
44                 $self->route($dxchan);
45         }
46 }
47
48 sub topcxx
49 {
50         my $self = shift;
51         unless (exists $self->{'-pcxx'}) {
52                 if (my $to = $self->{to}) {
53                         if (Route::Node::get($to)) {
54                                 
55                         }
56                 }
57                 $self->{'-pcxx'} = DXProt::pc51($self->{to}, $self->{o}, $self->{s});
58         }
59         return $self->{'-pcxx'};
60 }
61
62 1;