]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Misc.pl
typo for file in loadHelp() ... added getPath() for openLog()
[infobot.git] / src / Misc.pl
index e0a67fec7d322df54d8cc810dcde7c62a2208706..03a17328429103fb0155f8fcda9db4efa29ac79e 100644 (file)
@@ -9,7 +9,7 @@ if (&IsParam("useStrict")) { use strict; }
 
 sub help {
     my $topic = $_[0];
-    my $file  = $bot_misc_dir."/blootbotbot.help";
+    my $file  = $bot_misc_dir."/blootbot.help";
     my %help  = ();
 
     if (!open(FILE, $file)) {
@@ -72,6 +72,17 @@ sub help {
     return '';
 }
 
+sub getPath {
+    my ($pathnfile) = @_;
+
+    ### TODO: gotta hate an if statement.
+    if (/(.*)\/(.*?)$/) {
+       return $1;
+    } else {
+       return ".";
+    }
+}
+
 sub gettimeofday {
     if ($no_syscall) {         # fallback.
        return time();