diff options
-rw-r--r-- | .inspircd.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.inspircd.inc b/.inspircd.inc index 54737fdd7..6328bbd00 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -222,7 +222,7 @@ sub getpidfile { my $tmp = join("",@lines); # Does this file have a pid? - if ($tmp =~ /<pid file=\"(\S+)\">/i) { + if (($tmp =~ /<pid file=\"(\S+)\">/i) && ($tmp !~ /^#/)) { # Set the PID file and return. $pidfile = $1; return; @@ -242,7 +242,8 @@ sub getpidfile { } } else { # End of includes / No includes found. - return $confpath . "inspircd.pid"; + $pidfile = $confpath . "inspircd.pid"; + return; } } } |