summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
committerAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
commit22658d63bdb1e52a66f4514af45fa55ca5891345 (patch)
tree673304ab19f7e077b489354248247867518331f8 /src/regchannel.cpp
parentf2dee1e1d642b07947f59f91dfba9af34ef84685 (diff)
Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp43
1 files changed, 6 insertions, 37 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 4ed7b4d86..2fcb3ca14 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -359,8 +359,6 @@ ChannelInfo::~ChannelInfo()
if (this->c)
{
- this->Shrink("PERSIST");
-
if (this->bi && this->c->FindUser(this->bi))
this->bi->Part(this->c);
@@ -565,10 +563,14 @@ BotInfo *ChannelInfo::WhoSends() const
{
if (this && this->bi)
return this->bi;
- else if (ChanServ)
+
+ BotInfo *ChanServ = Config->GetClient("ChanServ");
+ if (ChanServ)
return ChanServ;
- else if (!BotListByNick->empty())
+
+ if (!BotListByNick->empty())
return BotListByNick->begin()->second;
+
return NULL;
}
@@ -1041,39 +1043,6 @@ bool ChannelInfo::CheckKick(User *user)
return true;
}
-void ChannelInfo::CheckTopic()
-{
- if (!this->c)
- return;
-
- /* We only compare the topics here, not the time or setter. This is because some (old) IRCds do not
- * allow us to set the topic as someone else, meaning we have to bump the TS and change the setter to us.
- * This desyncs what is really set with what we have stored, and we end up resetting the topic often when
- * it is not required
- */
- if (this->HasExt("TOPICLOCK") && this->last_topic != this->c->topic)
- {
- this->c->ChangeTopic(this->last_topic_setter, this->last_topic, this->last_topic_time);
- }
- else
- {
- this->last_topic = this->c->topic;
- this->last_topic_setter = this->c->topic_setter;
- this->last_topic_time = this->c->topic_ts;
- }
-}
-
-void ChannelInfo::RestoreTopic()
-{
- if (!this->c)
- return;
-
- if ((this->HasExt("KEEPTOPIC") || this->HasExt("TOPICLOCK")) && this->last_topic != this->c->topic)
- {
- this->c->ChangeTopic(!this->last_topic_setter.empty() ? this->last_topic_setter : this->WhoSends()->nick, this->last_topic, this->last_topic_time ? this->last_topic_time : Anope::CurTime);
- }
-}
-
int16_t ChannelInfo::GetLevel(const Anope::string &priv) const
{
if (PrivilegeManager::FindPrivilege(priv) == NULL)