From 0fb5041fc842ef0e65dc14c6ab6415e018b129b5 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 15 Oct 2007 22:10:12 +0000 Subject: Move some other stuff to helperfuncs (uline related, and timestring) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8213 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/helperfuncs.cpp') 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::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); +} -- cgit v1.2.3