From 1078718b3c90e9653ffb1d92054c7740abf11356 Mon Sep 17 00:00:00 2001 From: frostycoolslug Date: Sat, 27 Sep 2003 20:33:15 +0000 Subject: Combined The file Modules and Config file existance checkers into one function Added 'Exists' To the FileReader class of the Module API git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@192 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 75149aad0..389fb60e3 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -271,10 +271,23 @@ void FileReader::LoadFile(std::string filename) this->fc = c; } + FileReader::~FileReader() { } +bool FileReader::Exists() +{ + if (fc.size() == 0) + { + return(false); + } + else + { + return(true); + } +} + std::string FileReader::GetLine(int x) { if ((x<0) || (x>fc.size())) -- cgit v1.2.3