summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-07 14:11:21 -0400
committerAdam <Adam@anope.org>2010-06-18 20:58:55 -0400
commit9439cac6b126254bc488c2375b9e7ff5fd4fce74 (patch)
treed0f6bba4de5b0a4131a6b91eb711b6bf1960def8 /src/misc.c
parenta93be9ff1c417d73015fd53a9ee778ea2a642328 (diff)
Added m_ssl.cpp which allows Anope to use SSL when connecting to its uplink
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/misc.c b/src/misc.c
index 338737007..9b535b1ab 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -27,6 +27,21 @@ struct arc4_stream {
/*************************************************************************/
+/** Check if a file exists
+ * @param filename The file
+ * @return true if the file exists, false if it doens't
+ */
+bool IsFile(const std::string &filename)
+{
+ struct stat fileinfo;
+ if (!stat(filename.c_str(), &fileinfo))
+ {
+ return true;
+ }
+
+ return false;
+}
+
/**
* toupper: Like the ANSI functions, but make sure we return an
* int instead of a (signed) char.