From 72dc0f2eeecaf78902acacb9d183b7f9215dd385 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 19 Jan 2005 16:04:12 +0000 Subject: [PATCH] added language dependant motd files --- Changes | 4 ++++ perl/DXCommandmode.pm | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index d7083992..6cd63ad1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ 19Jan05======================================================================= 1. More Spanish changes by Angel, EA7WA. +2. add language dependant motd files. You can now have motd_{lang} and +motd_nor_{lang} (eg for Spanish: motd_es and motd_nor_es) for normal and +non-registered (if you use registration) users respectively. Based on an idea +from Angel, EA7WA. 18Jan05======================================================================= 1. Added missing Spanish translation courtesy of Angel EA7WA. 2. Really incorporate latest cty.dat (11Dec04) as opposed to merely thinking diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 80a31ed5..debc23d2 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -129,7 +129,12 @@ sub start # decide which motd to send - my $motd = "${main::motd}_nor" unless $self->{registered}; + my $motd; + unless ($self->{registered}) { + $motd = "${main::motd}_nor_$self->{lang}"; + $motd = "${main::motd}_nor" unless -e $motd; + } + $motd = "${main::motd}_$self->{lang}" unless $motd && -e $motd; $motd = $main::motd unless $motd && -e $motd; $self->send_file($motd) if -e $motd; -- 2.34.1