summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 8873931f5..fcd78faed 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -87,6 +87,9 @@ void Channel::Reset()
check_modes(this);
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);
+
+ if (this->ci)
+ this->ci->RestoreTopic();
}
void Channel::Sync()
@@ -117,12 +120,12 @@ void Channel::JoinUser(User *user)
uc->Status = Status;
this->users.push_back(uc);
- bool update_ts = false;
if (this->ci && this->ci->HasFlag(CI_PERSIST) && this->creation_time > this->ci->time_registered)
{
Log(LOG_DEBUG) << "Changing TS of " << this->name << " from " << this->creation_time << " to " << this->ci->time_registered;
this->creation_time = this->ci->time_registered;
- update_ts = true;
+ ircdproto->SendChannel(this, "");
+ this->Reset();
}
if (this->ci && check_access(user, this->ci, CA_MEMO) && this->ci->memos.memos.size() > 0)
@@ -142,7 +145,7 @@ void Channel::JoinUser(User *user)
* legit users - Rob
**/
if (this->users.size() >= Config->BSMinUsers && !this->FindUser(this->ci->bi))
- this->ci->bi->Join(this, update_ts);
+ this->ci->bi->Join(this, false);
/* Only display the greet if the main uplink we're connected
* to has synced, or we'll get greet-floods when the net
* recovers from a netsplit. -GD
@@ -153,17 +156,6 @@ void Channel::JoinUser(User *user)
this->ci->bi->lastmsg = Anope::CurTime;
}
}
-
- /* Update the TS, unless I'm joining a bot already */
- if (update_ts && user->server != Me)
- {
- /* Send the updated TS */
- if (!this->FindUser(whosends(this->ci)))
- {
- whosends(this->ci)->Join(this, update_ts);
- whosends(this->ci)->Part(this);
- }
- }
}
/** Remove a user internally from the channel