summaryrefslogtreecommitdiff
path: root/modules/protocol/bahamut.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/protocol/bahamut.cpp
parent9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (diff)
Added Anope::CurTime to keep us from calling time() everywhere
Diffstat (limited to 'modules/protocol/bahamut.cpp')
-rw-r--r--modules/protocol/bahamut.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 5707c642d..8e54de704 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -64,7 +64,7 @@ void bahamut_cmd_burst()
*/
void bahamut_cmd_svinfo()
{
- send_cmd("", "SVINFO 3 1 0 :%ld", static_cast<long>(time(NULL)));
+ send_cmd("", "SVINFO 3 1 0 :%ld", static_cast<long>(Anope::CurTime));
}
/* PASS */
@@ -152,7 +152,7 @@ class BahamutIRCdProto : public IRCDProto
/* this will likely fail so its only here for legacy */
send_cmd("", "SZLINE %s :%s", x->Mask.c_str(), x->Reason.c_str());
/* this is how we are supposed to deal with it */
- send_cmd("", "AKILL %s * %d %s %ld :%s", x->Mask.c_str(), 172800, x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd("", "AKILL %s * %d %s %ld :%s", x->Mask.c_str(), 172800, x->By.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
/* SVSNOOP */
@@ -207,10 +207,10 @@ class BahamutIRCdProto : public IRCDProto
void SendAkill(const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
- time_t timeleft = x->Expires - time(NULL);
+ time_t timeleft = x->Expires - Anope::CurTime;
if (timeleft > 172800)
timeleft = 172800;
- send_cmd("", "AKILL %s %s %d %s %ld :%s", x->GetHost().c_str(), x->GetUser().c_str(), static_cast<int>(timeleft), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
+ send_cmd("", "AKILL %s %s %d %s %ld :%s", x->GetHost().c_str(), x->GetUser().c_str(), static_cast<int>(timeleft), x->By.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
/*