1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 10:36:38 +02:00

Track when our clients are introduced or not

This commit is contained in:
Adam
2011-08-12 12:46:11 -04:00
parent feee50e695
commit f3d7d4ee37
7 changed files with 27 additions and 4 deletions
+7 -4
View File
@@ -20,6 +20,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
this->chancount = 0;
this->lastmsg = this->created = Anope::CurTime;
this->introduced = false;
BotListByNick[this->nick] = this;
if (!this->uid.empty())
@@ -28,15 +29,16 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
// If we're synchronised with the uplink already, send the bot.
if (Me && Me->IsSynced())
{
Anope::string tmodes = !this->botmodes.empty() ? ("+" + this->botmodes) : (ircd ? ircd->pseudoclient_mode : "");
if (!tmodes.empty())
this->SetModesInternal(tmodes.c_str());
ircdproto->SendClientIntroduction(this);
this->introduced = true;
XLine x(this->nick, "Reserved for services");
ircdproto->SendSQLine(NULL, &x);
}
Anope::string tmodes = !this->botmodes.empty() ? ("+" + this->botmodes) : (ircd ? ircd->pseudoclient_mode : "");
if (!tmodes.empty())
this->SetModesInternal(tmodes.c_str());
if (Config)
for (unsigned i = 0; i < Config->LogInfos.size(); ++i)
{
@@ -70,6 +72,7 @@ BotInfo::~BotInfo()
if (Me && Me->IsSynced())
{
ircdproto->SendQuit(this, "");
this->introduced = false;
XLine x(this->nick);
ircdproto->SendSQLineDel(&x);
}