itu => '0,ITU Zone',
cq => '0,CQ Zone',
enhanced => '5,Enhanced Client,yesno',
+ gtk => '5,Using GTK,yesno',
senddbg => '8,Sending Debug,yesno',
width => '0,Column Width',
disconnecting => '9,Disconnecting,yesno',
inqueue => '9,Input Queue,parray',
);
-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
# object destruction
sub DESTROY
{
if (defined $user) {
$self->{user} = $user;
$self->{lang} = $user->lang;
- $user->new_group() if !$user->group;
+ $user->new_group unless $user->group;
+ $user->new_buddies unless $user->buddies;
$self->{group} = $user->group;
$self->{sort} = $user->sort;
}
my @lines = split /\n/;
for (@lines) {
$conn->send_now("$sort$call|$_");
- dbg("-> $sort $call $_") if isdbg('chan');
+ # debug log it, but not if it is a log message
+ dbg("-> $sort $call $_") if $sort ne 'L' && isdbg('chan');
}
}
$self->{t} = time;
my @lines = split /\n/;
for (@lines) {
$conn->send_later("$sort$call|$_");
- dbg("-> $sort $call $_") if isdbg('chan');
+ # debug log it, but not if it is a log message
+ dbg("-> $sort $call $_") if $sort ne 'L' && isdbg('chan');
}
}
$self->{t} = time;
#
sub tell_login
{
- my ($self, $m) = @_;
+ my ($self, $m, $call) = @_;
+
+ $call ||= $self->{call};
# send info to all logged in thingies
my @dxchan = get_all_users();
foreach $dxchan (@dxchan) {
next if $dxchan == $self;
next if $dxchan->{call} eq $main::mycall;
- $dxchan->send($dxchan->msg($m, $self->{call})) if $dxchan->{logininfo};
+ $dxchan->send($dxchan->msg($m, $call)) if $dxchan->{logininfo};
+ }
+}
+
+#
+# Tell all the users if a buddy is logged or out
+#
+sub tell_buddies
+{
+ my ($self, $m, $call, $node) = @_;
+
+ $call ||= $self->{call};
+ $call =~ s/-\d+$//;
+ $m .= 'n' if $node;
+
+ # send info to all logged in thingies
+ my @dxchan = get_all_users();
+ my $dxchan;
+ foreach $dxchan (@dxchan) {
+ next if $dxchan == $self;
+ next if $dxchan->{call} eq $main::mycall;
+ $dxchan->send($dxchan->msg($m, $call, $node)) if grep $_ eq $call, @{$dxchan->{user}->{buddies}} ;
}
}
}
}
+sub handle_xml
+{
+ my $self = shift;
+ my $r = 0;
+
+ if (DXXml::available()) {
+ $r = $self->{handle_xml} || 0;
+ } else {
+ delete $self->{handle_xml} if exists $self->{handle_xml};
+ }
+ return $r;
+}
+
#no strict;
sub AUTOLOAD
{