projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log agw port on connection
[spider.git]
/
perl
/
DXCommandmode.pm
diff --git
a/perl/DXCommandmode.pm
b/perl/DXCommandmode.pm
index 80a31ed517a6829d91c4cf5ae034478403cf711f..eae67c7237024a85fb8a3b396731b727d39a6a04 100644
(file)
--- a/
perl/DXCommandmode.pm
+++ b/
perl/DXCommandmode.pm
@@
-87,7
+87,9
@@
sub start
my $name = $user->{name};
# log it
my $name = $user->{name};
# log it
- my $host = $self->{conn}->{peerhost} || "unknown";
+ my $host = $self->{conn}->{peerhost};
+ $host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
+ $host ||= "unknown";
Log('DXCommand', "$call connected from $host");
$self->{name} = $name ? $name : $call;
Log('DXCommand', "$call connected from $host");
$self->{name} = $name ? $name : $call;
@@
-129,7
+131,12
@@
sub start
# decide which motd to send
# 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;
$motd = $main::motd unless $motd && -e $motd;
$self->send_file($motd) if -e $motd;
@@
-489,7
+496,7
@@
sub run_cmd
sub process
{
my $t = time;
sub process
{
my $t = time;
- my @dxchan = DXChannel
->
get_all();
+ my @dxchan = DXChannel
::
get_all();
my $dxchan;
foreach $dxchan (@dxchan) {
my $dxchan;
foreach $dxchan (@dxchan) {
@@
-577,7
+584,7
@@
sub broadcast
my $pkg = shift; # ignored
my $s = shift; # the line to be rebroadcast
my $pkg = shift; # ignored
my $s = shift; # the line to be rebroadcast
- foreach my $dxchan (DXChannel
->
get_all()) {
+ foreach my $dxchan (DXChannel
::
get_all()) {
next unless $dxchan->{sort} eq 'U'; # only interested in user channels
next if grep $dxchan == $_, @_;
$dxchan->send($s); # send it
next unless $dxchan->{sort} eq 'U'; # only interested in user channels
next if grep $dxchan == $_, @_;
$dxchan->send($s); # send it
@@
-587,7
+594,7
@@
sub broadcast
# gimme all the users
sub get_all
{
# gimme all the users
sub get_all
{
- return grep {$_->{sort} eq 'U'} DXChannel
->
get_all();
+ return grep {$_->{sort} eq 'U'} DXChannel
::
get_all();
}
# run a script for this user
}
# run a script for this user
@@
-942,7
+949,7
@@
sub broadcast_debug
{
my $s = shift; # the line to be rebroadcast
{
my $s = shift; # the line to be rebroadcast
- foreach my $dxchan (DXChannel
->
get_all) {
+ foreach my $dxchan (DXChannel
::
get_all) {
next unless $dxchan->{enhanced} && $dxchan->{senddbg};
$dxchan->send_later('L', $s);
}
next unless $dxchan->{enhanced} && $dxchan->{senddbg};
$dxchan->send_later('L', $s);
}