summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-02 23:30:31 -0400
committerAdam <Adam@anope.org>2012-10-02 23:30:31 -0400
commit7551245f5715ecb6615e310c9e488efcabefd3b5 (patch)
tree2f71e4c0647c65b2b5e6758e6fc915819b7a55cc /src/channels.cpp
parent47bc551485f46f6195850be1c2a5edb1d8998e30 (diff)
Attempt #2 at silly topic ts thing, this is actually must cleaner
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index c95e46373..be3915b46 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -41,7 +41,7 @@ Channel::Channel(const Anope::string &nname, time_t ts) : Flags<ChannelFlag, 3>(
this->creation_time = ts;
this->server_modetime = this->chanserv_modetime = 0;
- this->server_modecount = this->chanserv_modecount = this->bouncy_modes = this->topic_time = 0;
+ this->server_modecount = this->chanserv_modecount = this->bouncy_modes = this->topic_ts = this->topic_time = 0;
this->ci = cs_findchan(this->name);
if (this->ci)
@@ -896,7 +896,8 @@ void Channel::ChangeTopicInternal(const Anope::string &user, const Anope::string
this->topic = newtopic;
this->topic_setter = u ? u->nick : user;
- this->topic_time = ts;
+ this->topic_ts = ts;
+ this->topic_time = Anope::CurTime;
Log(LOG_DEBUG) << "Topic of " << this->name << " changed by " << (u ? u->nick : user) << " to " << newtopic;
@@ -912,10 +913,13 @@ void Channel::ChangeTopic(const Anope::string &user, const Anope::string &newtop
this->topic = newtopic;
this->topic_setter = u ? u->nick : user;
- this->topic_time = ts;
+ this->topic_ts = ts;
ircdproto->SendTopic(this->ci->WhoSends(), this);
+ /* Now that the topic is set update the time set. This is *after* we set it so the protocol modules are able to tell the old last set time */
+ this->topic_time = Anope::CurTime;
+
FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(this, user, this->topic));
if (this->ci)