summaryrefslogtreecommitdiff
path: root/modules/extra/hs_request.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-09-10 20:31:31 -0400
committerAdam <Adam@anope.org>2010-09-10 20:31:31 -0400
commitf00e76d30a86acf0f18bcde5647eedd50de50569 (patch)
tree04af81a883ea6e71ec36e35a2822487c7f8192c6 /modules/extra/hs_request.cpp
parent9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (diff)
Added Anope::CurTime to keep us from calling time() everywhere
Diffstat (limited to 'modules/extra/hs_request.cpp')
-rw-r--r--modules/extra/hs_request.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp
index 9b1218113..edca02ade 100644
--- a/modules/extra/hs_request.cpp
+++ b/modules/extra/hs_request.cpp
@@ -84,7 +84,6 @@ class CommandHSRequest : public Command
Anope::string rawhostmask = params[0];
Anope::string hostmask;
NickAlias *na;
- time_t now = time(NULL);
Anope::string vIdent = myStrGetToken(rawhostmask, '@', 0); /* Get the first substring, @ as delimiter */
if (!vIdent.empty())
@@ -129,13 +128,13 @@ class CommandHSRequest : public Command
if ((na = findnick(nick)))
{
- if ((HSRequestMemoOper || HSRequestMemoSetters) && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > now)
+ if ((HSRequestMemoOper || HSRequestMemoSetters) && Config->MSSendDelay > 0 && u && u->lastmemosend + Config->MSSendDelay > Anope::CurTime)
{
me->NoticeLang(Config->s_HostServ, u, LNG_REQUEST_WAIT, Config->MSSendDelay);
- u->lastmemosend = now;
+ u->lastmemosend = Anope::CurTime;
return MOD_CONT;
}
- my_add_host_request(nick, vIdent, hostmask, u->nick, now);
+ my_add_host_request(nick, vIdent, hostmask, u->nick, Anope::CurTime);
me->NoticeLang(Config->s_HostServ, u, LNG_REQUESTED);
req_send_memos(u, vIdent, hostmask);