X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=infobot;h=2c58f3921cb7e3d493e96eb1f357d711d0d2f279;hb=d2f87ccd1d5f93afedc8f9f13b9f35260328614a;hp=eaa866e99c2024dcd7254e8ee3d159b123f63bbb;hpb=cafbeaa385e5b297457073270b8ec28edf765308;p=infobot.git diff --git a/infobot b/infobot index eaa866e..2c58f39 100755 --- a/infobot +++ b/infobot @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # infobot # copyright kevin lenzo (c) 1997-1999 @@ -11,6 +11,10 @@ use vars qw($bot_base_dir $bot_src_dir $bot_misc_dir $bot_state_dir $bot_pid $memusage %param ); +# ancient Perl may not like these, but modern systems should have this +use open ':utf8'; +use open ':std'; + BEGIN { if ( @ARGV and -f $ARGV[0] ) { @@ -19,7 +23,8 @@ BEGIN { } # set any $bot_*_dir var's that aren't already set - $bot_base_dir ||= '/SOME/DIRECTORY/HERE'; + $bot_base_dir ||= `pwd`; + chomp($bot_base_dir); $bot_config_dir ||= "$bot_base_dir/files/"; $bot_data_dir ||= "$bot_base_dir/files/"; $bot_state_dir ||= "$bot_base_dir/files/"; @@ -28,8 +33,6 @@ BEGIN { $bot_log_dir ||= "$bot_base_dir/log"; $bot_misc_dir ||= "$bot_base_dir/files"; - require "$bot_config_dir/directories"; - $bot_pid = $$; $bot_base_dir = $bot_state_dir;