summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 18:58:24 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 18:58:24 +0000
commit99064f734b9b1513c1d3b3792d6ea8102aae26e1 (patch)
treefbf84c7ddee3da74a6c4ea1f1bd79116c2c9b63d
parent526a37bc7a7e20fa8b912d7fd3ab61387c7051d9 (diff)
Add some missing slashes, and don't stupidly die on a config misparse
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11871 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--.inspircd.inc25
1 files changed, 5 insertions, 20 deletions
diff --git a/.inspircd.inc b/.inspircd.inc
index d65df60b3..a3df44eac 100644
--- a/.inspircd.inc
+++ b/.inspircd.inc
@@ -303,7 +303,7 @@ sub getpidfile
# Are We using a relative path?
if ($file !~ /^\//) {
# Convert it to a full path.
- $file = $runpath . $file;
+ $file = $runpath .'/'. $file;
}
# Have we checked this file before?
@@ -311,7 +311,7 @@ sub getpidfile
$filesparsed{$file} = 1;
# Open the File..
- open INFILE, '<', $file or die "Unable to open file $file included in configuration\n";
+ open INFILE, '<', $file or return;
# Grab entire file contents..
my(@lines) = <INFILE>;
# Close the file
@@ -331,13 +331,10 @@ sub getpidfile
{
return;
}
- else
+ elsif (-f "$runpath/$pidfile")
{
- if (-f $runpath . $pidfile)
- {
- $pidfile = $runpath . $pidfile;
- return;
- }
+ $pidfile = "$runpath/$pidfile";
+ return;
}
return;
}
@@ -352,18 +349,6 @@ sub getpidfile
# Decend into that file, and check for PIDs.. (that sounds like an STD ;/)
getpidfile($1);
# Was a PID found?
- if (-f $pidfile)
- {
- return;
- }
- else
- {
- if (-f $runpath . $pidfile)
- {
- $pidfile = $runpath . $pidfile;
- return;
- }
- }
if ($pidfile ne "") {
# Yes, Return.
return;