X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2FDXCommandmode.pm;h=270183bffd5058f7916aa19bc0c1a7d861243c24;hb=de7634cfdcc23dfc6fd9457d27245f27ddf2e252;hp=1750fee157acd6e87d497ec539642a6b08530893;hpb=b8a01c582b9914ebe5c44afed0016e594d76e938;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 1750fee1..270183bf 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -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 {