summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2013-12-14 22:55:10 -0800
committerAdam <adam@sigterm.info>2013-12-14 22:55:10 -0800
commit59df199aaedf8018979c444eaa8cca59ff001877 (patch)
treee7d873a3250f50b2ecb7c4bc47d7fcf7a9cefefd /src/modules.cpp
parent357d190074ee58809b31ea0c08543566168bddf6 (diff)
parentad47ea662698e72ff8f79b03512b1e7fe81bdf53 (diff)
Merge pull request #689 from SaberUK/master+cxxify
Clean up various things.
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 487bc4ea0..92f619743 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -25,7 +25,6 @@
#include <iostream>
-#include <fstream>
#include "inspircd.h"
#include "xline.h"
#include "socket.h"
@@ -708,47 +707,3 @@ Module* ModuleManager::Find(const std::string &name)
else
return modfind->second;
}
-
-FileReader::FileReader(const std::string& filename)
-{
- Load(filename);
-}
-
-void FileReader::Load(const std::string& filename)
-{
- // If the file is stored in the file cache then we used that version instead.
- std::string realName = ServerInstance->Config->Paths.PrependConfig(filename);
- ConfigFileCache::iterator it = ServerInstance->Config->Files.find(realName);
- if (it != ServerInstance->Config->Files.end())
- {
- this->lines = it->second;
- }
- else
- {
- lines.clear();
-
- std::ifstream stream(realName.c_str());
- if (!stream.is_open())
- throw CoreException(filename + " does not exist or is not readable!");
-
- std::string line;
- while (std::getline(stream, line))
- {
- lines.push_back(line);
- totalSize += line.size() + 2;
- }
-
- stream.close();
- }
-}
-
-std::string FileReader::GetString()
-{
- std::string buffer;
- for (file_cache::iterator it = this->lines.begin(); it != this->lines.end(); ++it)
- {
- buffer.append(*it);
- buffer.append("\r\n");
- }
- return buffer;
-}