summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-15 22:07:32 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-15 22:07:32 +0000
commit2c25d4a34428088b9407be14740041346500eb5f (patch)
treedf8faa38506e93d4d3ac8a8c70c32e6cbce577a5
parent8aa4df885e0d2f36ce737cf48aa3e2e7d7325107 (diff)
Fuck. Press save, then commit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8212 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/command_parse.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 462b50d88..9a525dd5b 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -59,49 +59,6 @@ std::string InspIRCd::TimeString(time_t curtime)
return std::string(ctime(&curtime),24);
}
-/** Refactored by Brain, Jun 2007. Much faster with some clever O(1) array
- * lookups and pointer maths.
- */
-long InspIRCd::Duration(const std::string &str)
-{
- unsigned char multiplier = 0;
- long total = 0;
- long times = 1;
- long subtotal = 0;
-
- /* Iterate each item in the string, looking for number or multiplier */
- for (std::string::const_reverse_iterator i = str.rbegin(); i != str.rend(); ++i)
- {
- /* Found a number, queue it onto the current number */
- if ((*i >= '0') && (*i <= '9'))
- {
- subtotal = subtotal + ((*i - '0') * times);
- times = times * 10;
- }
- else
- {
- /* Found something thats not a number, find out how much
- * it multiplies the built up number by, multiply the total
- * and reset the built up number.
- */
- if (subtotal)
- total += subtotal * duration_multi[multiplier];
-
- /* Next subtotal please */
- subtotal = 0;
- multiplier = *i;
- times = 1;
- }
- }
- if (multiplier)
- {
- total += subtotal * duration_multi[multiplier];
- subtotal = 0;
- }
- /* Any trailing values built up are treated as raw seconds */
- return total + subtotal;
-}
-
/* LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
* There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
* We need a version which takes two potential lists for JOIN, because a JOIN may contain two lists of items at once,