From f9110f02e7483530d46eb892999d09edb131ec7f Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 Apr 2007 19:18:08 +0000 Subject: We had to roll our own time function because some craqsmoker thought having a carriage return on the end of ctime and asctime was a great idea, and the only other solution is to fanny around with strftime. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6749 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index a59d6db62..bf04960bd 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -53,6 +53,11 @@ int InspIRCd::OperPassCompare(const char* data,const char* input, int tagnumber) return strcmp(data,input); } +std::string InspIRCd::TimeString(time_t curtime) +{ + return std::string(ctime(&curtime),24); +} + long InspIRCd::Duration(const char* str) { char n_field[MAXBUF]; -- cgit v1.2.3