summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2003-09-27 20:33:15 +0000
committerfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2003-09-27 20:33:15 +0000
commit1078718b3c90e9653ffb1d92054c7740abf11356 (patch)
treefa6427a8ac27d173fe251e2e0f338cba5c5f19f3 /src/modules.cpp
parentb1a82220c1433c0cff2465300bc2b2dfbf4cd8eb (diff)
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
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp13
1 files changed, 13 insertions, 0 deletions
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()))