diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-06 19:18:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-06 19:18:08 +0000 |
commit | f9110f02e7483530d46eb892999d09edb131ec7f (patch) | |
tree | e887d5cf65cf8c7e8667b6db15559a9b00c484b2 /src/command_parse.cpp | |
parent | 578f32db3ca4c05763d0eb6d9b5198e677b6f200 (diff) |
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
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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]; |