summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-12 12:46:11 -0400
committerAdam <Adam@anope.org>2011-08-12 12:46:11 -0400
commitf3d7d4ee3799513eee820d6c79d4e925fc47760e (patch)
tree583e40fcb17d66a523493b9edf4ef5c5ed321fa1 /src/bots.cpp
parentfeee50e6959171123773417caab73ecad3af824b (diff)
Track when our clients are introduced or not
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index e94691b05..3e9af64d5 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -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);
}