summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hashcomp.h12
-rw-r--r--src/hashcomp.cpp16
-rw-r--r--src/modules/m_filter.cpp5
3 files changed, 4 insertions, 29 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 71f900654..9a3169435 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -198,18 +198,6 @@ namespace irc
* @return True if tokens are left to be read, false if the last token was just retrieved.
*/
bool GetToken(std::string &token);
-
- /** Fetch the next token from the stream as an integer
- * @param token The next token available, or undefined if none remain
- * @return True if tokens are left to be read, false if the last token was just retrieved.
- */
- bool GetToken(int &token);
-
- /** Fetch the next token from the stream as a long integer
- * @param token The next token available, or undefined if none remain
- * @return True if tokens are left to be read, false if the last token was just retrieved.
- */
- bool GetToken(long &token);
};
/** The portparser class seperates out a port range into integers.
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 2288a227e..d510e40b1 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -219,22 +219,6 @@ bool irc::tokenstream::GetToken(std::string &token)
return true;
}
-bool irc::tokenstream::GetToken(int &token)
-{
- std::string tok;
- bool returnval = GetToken(tok);
- token = ConvToInt(tok);
- return returnval;
-}
-
-bool irc::tokenstream::GetToken(long &token)
-{
- std::string tok;
- bool returnval = GetToken(tok);
- token = ConvToInt(tok);
- return returnval;
-}
-
irc::sepstream::sepstream(const std::string& source, char separator, bool allowempty)
: tokens(source), sep(separator), pos(0), allow_empty(allowempty)
{
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index c039c0455..f7d73ac4a 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -587,7 +587,10 @@ FilterResult ModuleFilter::DecodeFilter(const std::string &data)
if (c != 0)
throw ModuleException("Invalid flag: '" + std::string(1, c) + "'");
- tokens.GetToken(res.duration);
+ std::string duration;
+ tokens.GetToken(duration);
+ res.duration = ConvToInt(duration);
+
tokens.GetToken(res.reason);
/* Hax to allow spaces in the freeform without changing the design of the irc protocol */