+# if (@bad = BadWords::check($cmdline)) {
+# $self->badcount(($self->badcount||0) + @bad);
+# LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with badwords: '" . join(',', @bad) . "'");
+ # } else {
+ my @cmd = split /\s*\\n\s*/, $cmdline;
+ foreach my $l (@cmd) {
+
+ # rate limiting code
+
+ if (($self->{cmdintstart} + $cmdinterval <= $main::systime) || $self->{inscript}) {
+ $self->{cmdintstart} = $main::systime;
+ $self->{cmdcount} = 1;
+ dbg("$self->{call} started cmdinterval") if isdbg('cmdcount');
+ } else {
+ if (++$self->{cmdcount} > $maxcmdcount) {
+ LogDbg('baduser', qq{User $self->{call} sent $self->{cmdcount} (>= $maxcmdcount) cmds in $cmdinterval seconds starting at } . atime($self->{cmdintstart}) . ", disconnected" );
+ $self->disconnect;
+ }
+ dbg("$self->{call} cmd: '$l' cmdcount = $self->{cmdcount} in $cmdinterval secs") if isdbg('cmdcount');
+ }
+ $self->send_ans(run_cmd($self, $l));
+ }
+# }