X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fchat.pl;h=874f6ac1c869aa5058343028ece2030c114282f9;hb=ac14c6983861c08b8a2842af46e67407600f8065;hp=a6321f5fa66664c2db07cce19c25e9e2d82c0c12;hpb=e07645cec07ba739a20cc009d7dd138c962b66eb;p=spider.git diff --git a/cmd/chat.pl b/cmd/chat.pl index a6321f5f..874f6ac1 100644 --- a/cmd/chat.pl +++ b/cmd/chat.pl @@ -10,7 +10,7 @@ my ($self, $line) = @_; my @f = split /\s+/, $line, 2; -return (1, $self->msg('e5')) if $self->remotecmd; +return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript; return (1, $self->msg('e34')) unless @f == 2; return (1, $self->msg('e28')) unless $self->registered; @@ -29,7 +29,7 @@ $line =~ s/\^/:/og; my @bad; if (@bad = BadWords::check($line)) { $self->badcount(($self->badcount||0) + @bad); - Log('DXCommand', "$self->{call} swore: $line"); + LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")"); Log('chat', $target, $from, "[to $from only] $line"); return (1, "$target de $from <$t>: $line"); } @@ -38,6 +38,8 @@ if (@bad = BadWords::check($line)) { my $msgid = DXProt::nextchatmsgid(); $text = "#$msgid $text"; -DXProt::send_chat($self, DXProt::pc12($from, $text, '*', $target), $from, '*', $text, $target, $main::mycall, '0'); +$main::me->normal(DXProt::pc93($target, $from, undef, $text)); + +#DXProt:):send_chat($self, 1, DXProt::pc12($from, $text, '*', $target), $from, '*', $text, $target, $main::mycall, '0'); return (1, ());