]> git.donarmstrong.com Git - infobot.git/commitdiff
typo for file in loadHelp() ... added getPath() for openLog()
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 12 Aug 2000 12:38:59 +0000 (12:38 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 12 Aug 2000 12:38:59 +0000 (12:38 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@37 c11ca15a-4712-0410-83d8-924469b57eb5

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();