many changes (see Changes)
[spider.git] / cmd / wx.pl
index 025729369a55e2e13f5ca85dddbeb218e94aefb2..dc3dc7296c14542cdbf1c44df81ffad233b7f416 100644 (file)
--- a/cmd/wx.pl
+++ b/cmd/wx.pl
@@ -11,7 +11,7 @@
 #
 # Copyright (c) 1998 Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 
 my ($self, $line) = @_;
@@ -23,7 +23,7 @@ my $t = ztime(time);
 my $tonode;
 my $via;
 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
-return (1, $self->msg('e28')) unless $self->registered;
+return (1, $self->msg('e28')) unless $self->isregistered;
 
 if ($sort eq "FULL") {
   $line =~ s/^$f[0]\s+//;    # remove it
@@ -55,8 +55,10 @@ if ($drop) {
        return (1, ());
 }
 
-Log('ann', $via ? $via : '*', $from, $line);
-$main::me->normal(DXProt::pc93($to, $from, $via, $line));
+my $ipaddr = DXCommandmode::alias_localhost($self->hostname || '127.0.0.1');
+
+Log('ann', $via ? $via : '*', $from, $line, $ipaddr);
+$main::me->normal(DXProt::pc93($to, $from, $via, $line, undef, $ipaddr));
 
 #DXChannel::broadcast_list("WX de $from <$t>: $line", 'wx', undef, @locals);
 #if ($to ne "LOCAL") {