From da265814cbeb83f11c7da850dae8b6b7517a2c9c Mon Sep 17 00:00:00 2001 From: dms Date: Sat, 12 Aug 2000 12:38:59 +0000 Subject: [PATCH] typo for file in loadHelp() ... added getPath() for openLog() git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@37 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Misc.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Misc.pl b/src/Misc.pl index e0a67fe..03a1732 100644 --- a/src/Misc.pl +++ b/src/Misc.pl @@ -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(); -- 2.39.2