summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 63f599f75..ceb4711a9 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -592,4 +592,26 @@ long InspIRCd::Duration(const std::string &str)
return total + subtotal;
}
+bool InspIRCd::ULine(const char* server)
+{
+ if (!server)
+ return false;
+ if (!*server)
+ return true;
+
+ return (Config->ulines.find(server) != Config->ulines.end());
+}
+
+bool InspIRCd::SilentULine(const char* server)
+{
+ std::map<irc::string,bool>::iterator n = Config->ulines.find(server);
+ if (n != Config->ulines.end())
+ return n->second;
+ else return false;
+}
+
+std::string InspIRCd::TimeString(time_t curtime)
+{
+ return std::string(ctime(&curtime),24);
+}