From 6fe4d3ecbdc3196c7c62b9b7e00d5063bd0dbee9 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Tue, 3 Jul 2007 23:26:43 +0000 Subject: code optimizations, rehash bugfix, lots of cleanup, new hilights, removed some old rules, added and improved some new rules --- meta.pl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'meta.pl') diff --git a/meta.pl b/meta.pl index 64236f3..4b71024 100755 --- a/meta.pl +++ b/meta.pl @@ -1,6 +1,12 @@ #!/usr/bin/perl -w use lib '/home/icxcnika/AntiSpamMeta'; +#use Devel::Profiler +# package_filter => sub { +# my $pkg = shift; +# return 0 if $pkg =~ /^XML::Simple/; +# return 1; +# }; use warnings; use strict; use Net::IRC; @@ -8,12 +14,13 @@ use Data::Dumper; use IO::All; use Getopt::Long; -@::eline=(); +%::eline=(); $::pass = ''; -my @modules = qw/Xml Util Inspect Services Log Command Event Classes Actions Mysql OperQueue/; - +BEGIN { +my @modules = qw/Xml Util Inspect Event Services Log Command Classes Actions Mysql OperQueue/; require 'modules/' . lc $_ . '.pl' foreach @modules; +} sub init { my ( $conn, $host ); @@ -45,8 +52,11 @@ sub init { $::commander = ASM::Commander->new(); $::event = ASM::Event->new($conn, $::inspector); $::classes = ASM::Classes->new(); - @::eline=io('exempt.txt')->getlines; - chomp @::eline; + my @eline=io('exempt.txt')->getlines; + chomp @eline; + foreach my $item (@eline) { + $::eline{lc $item} = 1; + } $irc->start(); } -- cgit v1.2.3