3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-07-15 18:07:32 +02:00
pbot/PBot/BotAdminStuff.pm
Pragmatic Software f725743ccb == MAJOR NEW BETA RELEASE ==
Converted single large "amalgamate" monolithic pbot2.pl script into multiple Perl packages/modules.

Tons of refactoring and clean-ups.

Consider this version to be beta.  Use at your own risk.
2010-03-17 06:36:54 +00:00

42 lines
561 B
Perl

# File: NewModule.pm
# Authoer: pragma_
#
# Purpose: New module skeleton
package PBot::BotAdminStuff;
use warnings;
use strict;
BEGIN {
use Exporter ();
use vars qw($VERSION @ISA @EXPORT_OK);
$VERSION = $PBot::PBot::VERSION;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%admins);
}
use vars @EXPORT_OK;
%admins = ();
sub loggedin {
my ($nick, $host) = @_;
if(exists $admins{$nick} && $host =~ /$admins{$nick}{host}/
&& exists $admins{$nick}{login}) {
return 1;
} else {
return 0;
}
}
sub load_admins {
}
sub save_admins {
}
1;