mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 19:05:50 -04:00
16 lines
403 B
Perl
16 lines
403 B
Perl
use DBI;
|
|
|
|
no warnings 'void';
|
|
|
|
sub {
|
|
my( $said, $pm ) = @_;
|
|
|
|
my $dbh = DBI->connect("dbi:SQLite:dbname=var/hosts.db");
|
|
|
|
my $recs = $dbh->selectall_arrayref( "SELECT * FROM hosts where host = ?", {Slice=>{}}, $said->{body} );
|
|
|
|
print "$said->{body}: ", join ", ", map $_->{nick}, @$recs;
|
|
};
|
|
|
|
__DATA__
|
|
host_lookup <hostname>. Returns all of the nicks this bot has seen using the host name you specify.
|