From 169b87f8a9b564d04667c42fad973a813af41ccb Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 3 Jun 2006 18:39:03 +0000 Subject: [PATCH] Change buddy message. --- Changes | 5 ++++- perl/DXChannel.pm | 4 ++-- perl/DXCommandmode.pm | 3 +-- perl/DXProt.pm | 2 +- perl/Messages | 2 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 35e9a6d3..ea6a61ed 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ 03Jun06======================================================================= -1. Added changes from Jim AD1C. +1. Added changes to wpxloc.raw (prefixes) suggested by Jim AD1C. +2. Made a change to prevent xml data being interpreted unless we are +configured for it. +3. Change the buddy messages after a suggestion from Angel EA7WA. 02Apr06======================================================================= 1. incorporated cty-1604 data. 29Mar06======================================================================= diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 929e7e53..127f3a06 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -517,7 +517,7 @@ sub tell_buddies $call ||= $self->{call}; $call =~ s/-\d+$//; - my $s = $node ? "$node: $call" : $call; + $m .= 'n' if $node; # send info to all logged in thingies my @dxchan = get_all_users(); @@ -525,7 +525,7 @@ sub tell_buddies foreach $dxchan (@dxchan) { next if $dxchan == $self; next if $dxchan->{call} eq $main::mycall; - $dxchan->send($dxchan->msg($m, $s)) if grep $_ eq $call, @{$dxchan->{user}->{buddies}} ; + $dxchan->send($dxchan->msg($m, $call, $node)) if grep $_ eq $call, @{$dxchan->{user}->{buddies}} ; } } diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index ea99e3d1..7500d17d 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -215,8 +215,7 @@ sub start my $ref = Route::User::get($call); if ($ref) { foreach my $node (@{$ref->parent}) { - my $s = $node eq $main::mycall ? $call : "$node: $call"; - $self->send($self->msg('loginb', $s)); + $self->send($self->msg($node eq $main::mycall ? 'loginb' : 'loginbn', $call, $node)); } } } diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 53ca8ea3..143b71e4 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -333,7 +333,7 @@ sub normal { my ($self, $line) = @_; - if ($line =~ '^<\w+\s') { + if ($line =~ '^<\w+\s' && $main::do_xml) { DXXml::normal($self, $line); return; } diff --git a/perl/Messages b/perl/Messages index 0c667054..e8a31087 100644 --- a/perl/Messages +++ b/perl/Messages @@ -168,7 +168,9 @@ package DXM; lockoutun => '$_[0] Unlocked', lockoutuse => 'usage: sh/lockout |ALL', loginb => 'Buddy $_[0] has logged in', + loginbn => 'Buddy $_[0] has logged in at $_[1]', logoutb => 'Buddy $_[0] has logged out', + logoutbn => 'Buddy $_[0] has logged out from $_[1]', loginu => 'User $_[0] has logged in', logoutu => 'User $_[0] has logged out', loginn => 'Node $_[0] has logged in', -- 2.43.0