use Mojo::IOLoop;
use DXSubprocess;
use Mojo::UserAgent;
+use DXCIDR;
use strict;
use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase %nothereslug
$self->tell_login('loginu');
$self->tell_buddies('loginb');
+
+ # is this a bad ip address?
+ if (is_ipaddr($self->{hostname})) {
+ $self->{badip} = DXCIDR->find($self->{hostname});
+ }
# do we need to send a forward/opernam?
my $lastoper = $user->lastoper || 0;
$cmdline =~ s/^\s*(.*)\s*$/$1/;
if ($self->{state} eq 'page') {
- my $i = $self->{pagelth};
+ my $i = $self->{pagelth}-5;
my $ref = $self->{pagedata};
my $tot = @$ref;
}
# send a tranche of data
- while ($i-- > 0 && @$ref) {
+ for (; $i > 0 && @$ref; --$i) {
my $line = shift @$ref;
$line =~ s/\s+$//o; # why am having to do this?
$self->send($line);
$self->send_file($motd) if -e $motd;
}
-
# Punt off a long running command into a separate process
#
# This is called from commands to run some potentially long running
sub user_count
{
- return ($users, $maxusers);
+ return ($users, $maxusers);
}
1;