From: Andres S. <di...@us...> - 2005-02-11 20:33:45
|
Update of /cvsroot/tuxaator/tuxaator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15611 Modified Files: tuxaator Log Message: automatic plugin finding mechanism from actually running code Index: tuxaator =================================================================== RCS file: /cvsroot/tuxaator/tuxaator/tuxaator,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** tuxaator 11 Feb 2005 13:37:05 -0000 1.90 --- tuxaator 11 Feb 2005 20:33:34 -0000 1.91 *************** *** 13,16 **** --- 13,17 ---- use BotCore; #use Tuxaator::Plugin; + use File::Glob ':glob'; my ($irc,$whoami,$driver,$dbh,%last,%plugins,%msg_handlers,$DEBUG); my $Output; *************** *** 21,24 **** --- 22,26 ---- my $basedir = $ENV{'PWD'}; + my $lk = 0; my %timers; *************** *** 80,92 **** # load the required plugins my ($_plugin,$_id); ! ! my @plugins_to_load = split "," => $config{'load_plugins'}; ! #my @plugins_to_load = bsd_glob('Plugins/*/Plugin.pm'); # well, dat is no good, I need to way to specify plugins in the ini file foreach my $plugin (@plugins_to_load) { ! #my($pname) = $plugin =~ /Plugins\/(.*)\/Plugin.pm$/; ! my $pname = $plugin; print "Loading $pname... "; unless (eval "require Plugins::${pname}::Plugin") --- 82,91 ---- # load the required plugins my ($_plugin,$_id); ! my @plugins_to_load = bsd_glob('Plugins/*/Plugin.pm'); # well, dat is no good, I need to way to specify plugins in the ini file foreach my $plugin (@plugins_to_load) { ! my($pname) = $plugin =~ /Plugins\/(.*)\/Plugin.pm$/; print "Loading $pname... "; unless (eval "require Plugins::${pname}::Plugin") |