diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_cban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_chanhistory.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_connectban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_dccallow.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_dnsbl.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_rline.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_setidle.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_shun.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_svshold.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_timedbans.cpp | 2 |
11 files changed, 15 insertions, 16 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index a3c0130b9..69eb82e51 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -114,7 +114,7 @@ class CommandCBan : public Command else { // Adding - XXX todo make this respect <insane> tag perhaps.. - long duration = ServerInstance->Duration(parameters[1]); + unsigned long duration = InspIRCd::Duration(parameters[1]); const char *reason = (parameters.size() > 2) ? parameters[2].c_str() : "No reason supplied"; CBan* r = new CBan(ServerInstance->Time(), duration, user->nick.c_str(), reason, parameters[0].c_str()); diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index e48e67fe5..036fc1df6 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -70,7 +70,7 @@ class HistoryMode : public ModeHandler return MODEACTION_DENY; unsigned int len = ConvToInt(parameter.substr(0, colon)); - int time = ServerInstance->Duration(duration); + int time = InspIRCd::Duration(duration); if (len == 0 || time < 0) return MODEACTION_DENY; if (len > maxlines && IS_LOCAL(source)) diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index 2a00b36df..de69ab7ed 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -59,7 +59,7 @@ class ModuleConnectBan : public Module if (threshold == 0) threshold = 10; - banduration = ServerInstance->Duration(tag->getString("duration", "10m")); + banduration = InspIRCd::Duration(tag->getString("duration", "10m")); if (banduration == 0) banduration = 10*60; } diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index e08b5d3d1..7ae20bb3a 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -152,10 +152,10 @@ class CommandDccallow : public Command std::string mask = target->nick+"!"+target->ident+"@"+target->dhost; std::string default_length = ServerInstance->Config->ConfValue("dccallow")->getString("length"); - long length; + unsigned long length; if (parameters.size() < 2) { - length = ServerInstance->Duration(default_length); + length = InspIRCd::Duration(default_length); } else if (!atoi(parameters[1].c_str())) { @@ -163,7 +163,7 @@ class CommandDccallow : public Command } else { - length = ServerInstance->Duration(parameters[1]); + length = InspIRCd::Duration(parameters[1]); } if (!ServerInstance->IsValidMask(mask.c_str())) diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index dcaea4ac3..72414b7a5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -291,7 +291,7 @@ class ModuleDNSBL : public Module } e->banaction = str2banaction(tag->getString("action")); - e->duration = ServerInstance->Duration(tag->getString("duration", "60")); + e->duration = InspIRCd::Duration(tag->getString("duration", "60")); /* Use portparser for record replies */ diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 86ef0d4f6..81457d40c 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -236,7 +236,7 @@ CmdResult CommandFilter::Handle(const std::vector<std::string> ¶meters, User { if (parameters.size() >= 5) { - duration = ServerInstance->Duration(parameters[3]); + duration = InspIRCd::Duration(parameters[3]); reasonindex = 4; } else @@ -661,7 +661,7 @@ void ModuleFilter::ReadFilters() std::string reason = i->second->getString("reason"); std::string action = i->second->getString("action"); std::string flgs = i->second->getString("flags"); - long gline_time = ServerInstance->Duration(i->second->getString("duration")); + unsigned long gline_time = InspIRCd::Duration(i->second->getString("duration")); if (flgs.empty()) flgs = "*"; diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 5548d2baa..9e8539b61 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -154,7 +154,7 @@ class CommandRLine : public Command { // Adding - XXX todo make this respect <insane> tag perhaps.. - long duration = ServerInstance->Duration(parameters[1]); + unsigned long duration = InspIRCd::Duration(parameters[1]); XLine *r = NULL; try diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index a74f4abf7..c54881677 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -36,7 +36,7 @@ class CommandSetidle : public SplitCommand CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user) { - time_t idle = ServerInstance->Duration(parameters[0]); + int idle = InspIRCd::Duration(parameters[0]); if (idle < 1) { user->WriteNumeric(948, "%s :Invalid idle time.",user->nick.c_str()); diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index baeb6215f..bf31cd70e 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -124,11 +124,11 @@ class CommandShun : public Command else { // Adding - XXX todo make this respect <insane> tag perhaps.. - long duration; + unsigned long duration; std::string expr; if (parameters.size() > 2) { - duration = ServerInstance->Duration(parameters[1]); + duration = InspIRCd::Duration(parameters[1]); expr = parameters[2]; } else diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 128d610ca..93fb8a12f 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -122,8 +122,7 @@ class CommandSvshold : public Command if (parameters.size() < 3) return CMD_FAILURE; - // Adding - XXX todo make this respect <insane> tag perhaps.. - long duration = ServerInstance->Duration(parameters[1]); + unsigned long duration = InspIRCd::Duration(parameters[1]); SVSHold* r = new SVSHold(ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str()); if (ServerInstance->XLines->AddLine(r, user)) diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 421398a44..e10a622e9 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -66,7 +66,7 @@ class CommandTban : public Command TimedBan T; std::string channelname = parameters[0]; - long duration = ServerInstance->Duration(parameters[1]); + unsigned long duration = InspIRCd::Duration(parameters[1]); unsigned long expire = duration + ServerInstance->Time(); if (duration < 1) { |