added builtin sh.qsl command
[spider.git] / perl / DXCommandmode.pm
index 1750fee157acd6e87d497ec539642a6b08530893..270183bffd5058f7916aa19bc0c1a7d861243c24 100644 (file)
@@ -32,6 +32,8 @@ use Sun;
 use Internet;
 use Script;
 use Net::Telnet;
+use QSL;
+use DB_File;
 
 use strict;
 use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug $maxbadcount);
@@ -802,6 +804,26 @@ sub announce
        $self->local_send($target eq 'WX' ? 'W' : 'N', $buf);
 }
 
+# send a chat
+sub chat
+{
+       my $self = shift;
+       my $line = shift;
+       my $isolate = shift;
+       my $to = shift;
+       my $target = shift;
+       my $text = shift;
+       my ($filter, $hops);
+
+       return unless grep uc $_ eq $to, @{$self->{user}->{group}};
+       
+       $text =~ s/^\#\d+ //;
+       my $buf = "$to de $_[0]: $text";
+       $buf =~ s/\%5E/^/g;
+       $buf .= "\a\a" if $self->{beep};
+       $self->local_send('C', $buf);
+}
+
 # send a dx spot
 sub dx_spot
 {