1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 21:23:13 +02:00

Moved the core pseudo clients out into their own modules

This commit is contained in:
Adam
2011-04-22 03:16:11 -04:00
parent 1782ce260c
commit c8c23158a4
226 changed files with 5187 additions and 4891 deletions
+14 -2
View File
@@ -11,6 +11,8 @@
#include "services.h"
#include "modules.h"
#include "chanserv.h"
#include "nickserv.h"
ChanAccess::ChanAccess(const Anope::string &umask)
{
@@ -164,6 +166,16 @@ ChannelInfo::~ChannelInfo()
--this->founder->channelcount;
}
/** Find which bot should send mode/topic/etc changes for this channel
* @return The bot
*/
BotInfo *ChannelInfo::WhoSends()
{
if (!this || !this->bi || !this->c || !this->botflags.HasFlag(BS_SYMBIOSIS) || !this->c->FindUser(this->bi))
return chanserv ? chanserv->Bot() : (nickserv ? nickserv->Bot() : NULL);
return this->bi;
}
/** Add an entry to the channel access list
*
* @param mask The mask of the access entry
@@ -553,7 +565,7 @@ void ChannelInfo::LoadMLock()
else
{
if (!this->bi)
whosends(this)->Assign(NULL, this);
this->WhoSends()->Assign(NULL, this);
if (this->c->FindUser(this->bi) == NULL)
this->bi->Join(this->c);
@@ -860,7 +872,7 @@ void ChannelInfo::RestoreTopic()
if ((this->HasFlag(CI_KEEPTOPIC) || this->HasFlag(CI_TOPICLOCK)) && this->last_topic != this->c->topic)
{
this->c->ChangeTopic(!this->last_topic_setter.empty() ? this->last_topic_setter : whosends(this)->nick, this->last_topic, this->last_topic_time ? this->last_topic_time : Anope::CurTime);
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);
}
}