diff options
author | Adam <Adam@anope.org> | 2010-09-10 20:31:31 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-10 20:31:31 -0400 |
commit | f00e76d30a86acf0f18bcde5647eedd50de50569 (patch) | |
tree | 04af81a883ea6e71ec36e35a2822487c7f8192c6 /modules/protocol/ratbox.cpp | |
parent | 9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (diff) |
Added Anope::CurTime to keep us from calling time() everywhere
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r-- | modules/protocol/ratbox.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 2aa528f49..505d143fd 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -59,7 +59,7 @@ IRCDVar myIrcd[] = { */ void ratbox_cmd_svinfo() { - send_cmd("", "SVINFO 6 3 0 :%ld", static_cast<long>(time(NULL))); + send_cmd("", "SVINFO 6 3 0 :%ld", static_cast<long>(Anope::CurTime)); } void ratbox_cmd_svsinfo() @@ -147,7 +147,7 @@ class RatboxProto : public IRCDProto void SendAkill(const XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str()); + send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - Anope::CurTime), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str()); } void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf) @@ -424,7 +424,6 @@ int anope_event_topic(const Anope::string &source, int ac, const char **av) else { Channel *c = findchan(av[0]); - time_t topic_time = time(NULL); if (!c) { @@ -432,7 +431,7 @@ int anope_event_topic(const Anope::string &source, int ac, const char **av) return MOD_CONT; } - if (check_topiclock(c, topic_time)) + if (check_topiclock(c, Anope::CurTime)) return MOD_CONT; c->topic.clear(); @@ -441,7 +440,7 @@ int anope_event_topic(const Anope::string &source, int ac, const char **av) u = finduser(source); c->topic_setter = u ? u->nick : source; - c->topic_time = topic_time; + c->topic_time = Anope::CurTime; record_topic(av[0]); |