X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FFiles.pl;h=ffd8deaee7057236b55fef7c01f39250c37a6ec2;hb=d3faaba2ad8c02cdf10e1a9698592afc6ed928bc;hp=e86d22857466ddf26a8280af5aa893df11699caa;hpb=0fbfef3c124ae0abe85dbf5eb4625520f0772487;p=infobot.git diff --git a/src/Files.pl b/src/Files.pl index e86d228..ffd8dea 100644 --- a/src/Files.pl +++ b/src/Files.pl @@ -5,7 +5,11 @@ # Created: 19991221 # -if (&IsParam("useStrict")) { use strict; } +use strict; + +use vars qw(%lang %ircPort); +use vars qw(@ircServers); +use vars qw($bot_config_dir); # File: Language support. sub loadLang { @@ -44,7 +48,7 @@ sub loadLang { close FILE; $file =~ s/^.*\///; - &status("Loaded lang $file ($langCount items)"); + &status("Loaded $file ($langCount items)"); } # File: Irc Servers list. @@ -63,7 +67,7 @@ sub loadIRCServers { next if /^\s*$/; next if /^[\#\[ ]/; - if (/^(\S+)(:(\d+))?$/) { + if (/^\s*(\S+?)(:(\d+))?\s*$/) { push(@ircServers,$1); $ircPort{$1} = ($3 || 6667); } else { @@ -73,7 +77,7 @@ sub loadIRCServers { close FILE; $file =~ s/^.*\///; - &status("Loaded ircServers $file (". scalar(@ircServers) ." servers)"); + &status("Loaded $file (". scalar(@ircServers) ." servers)"); } 1;