diff options
author | Adam <Adam@anope.org> | 2012-10-01 21:26:41 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-01 21:26:41 -0400 |
commit | 2d2ab4fec463fc86c552ec79e6ee6ff4b0421341 (patch) | |
tree | 657bd603d97a0f89490529a256d49cf991184525 | |
parent | a434baed9154d90ad0dfd31c71a463fb8300bfd8 (diff) |
Fixed handling TOPIC on unreal, dont set topics in Channel::Reset unless we are synced, and fixed ts checking in Channel::SetModesInternal
-rw-r--r-- | modules/protocol/unreal.cpp | 2 | ||||
-rw-r--r-- | src/channels.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index d3b94b26c..de452e196 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -1062,7 +1062,7 @@ struct IRCDMessageSJoin : IRCDMessage struct IRCDMessageTopic : IRCDMessage { - IRCDMessageTopic() : IRCDMessage("TOPIC", 4) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } + IRCDMessageTopic() : IRCDMessage("TOPIC", 4) { } /* ** source = sender prefix diff --git a/src/channels.cpp b/src/channels.cpp index 1790ddda1..c95e46373 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -96,7 +96,7 @@ void Channel::Reset() for (CUserList::const_iterator it = this->users.begin(), it_end = this->users.end(); it != it_end; ++it) chan_set_correct_modes((*it)->user, this, 1, false); - if (this->ci) + if (this->ci && Me && Me->IsSynced()) this->ci->RestoreTopic(); } @@ -695,9 +695,9 @@ void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode, ++this->server_modecount; } - if (ts > 0 && ts < this->creation_time) + if (ts > this->creation_time) return; - else if (ts > this->creation_time) + else if (ts < this->creation_time) { Log(LOG_DEBUG) << "Changing TS of " << this->name << " from " << this->creation_time << " to " << ts; this->creation_time = ts; |