summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_chanhistory.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp
index 06840744b..08f4291c9 100644
--- a/src/modules/m_chanhistory.cpp
+++ b/src/modules/m_chanhistory.cpp
@@ -48,20 +48,6 @@ struct HistoryList
class HistoryMode : public ParamMode<HistoryMode, SimpleExtItem<HistoryList> >
{
- bool IsValidDuration(const std::string& duration)
- {
- for (std::string::const_iterator i = duration.begin(); i != duration.end(); ++i)
- {
- unsigned char c = *i;
- if (((c >= '0') && (c <= '9')) || (c == 's') || (c == 'S'))
- continue;
-
- if (duration_multi[c] == 1)
- return false;
- }
- return true;
- }
-
public:
unsigned int maxlines;
HistoryMode(Module* Creator)
@@ -79,7 +65,7 @@ class HistoryMode : public ParamMode<HistoryMode, SimpleExtItem<HistoryList> >
}
std::string duration(parameter, colon+1);
- if ((IS_LOCAL(source)) && ((duration.length() > 10) || (!IsValidDuration(duration))))
+ if ((IS_LOCAL(source)) && ((duration.length() > 10) || (!InspIRCd::IsValidDuration(duration))))
{
source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter));
return MODEACTION_DENY;