summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-30 15:50:39 -0400
committerAdam <Adam@anope.org>2012-10-30 15:50:39 -0400
commitb07928eea95dc2c12a2be8adfe804e2019881ee5 (patch)
tree6ae3ca2794f13d868c5931fc71ebbefa0313265c /src
parent1ef748038083e845af040ddc0b52ac27d2fe6753 (diff)
Clean up ngircd proto mod slightly, and send sqlines before introducing clients
Diffstat (limited to 'src')
-rw-r--r--src/bots.cpp4
-rw-r--r--src/init.cpp11
-rw-r--r--src/servers.cpp7
3 files changed, 13 insertions, 9 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index bc7fc3cb0..95e28e5f0 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -37,10 +37,10 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
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);
+ ircdproto->SendClientIntroduction(this);
+ this->introduced = true;
}
}
diff --git a/src/init.cpp b/src/init.cpp
index c2c44ec16..cd53129a8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -47,15 +47,18 @@ void introduce_user(const Anope::string &user)
User *u = finduser(user);
if (u)
{
- ircdproto->SendClientIntroduction(u);
-
BotInfo *bi = findbot(u->nick);
if (bi)
{
- bi->introduced = true;
-
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(NULL, &x);
+ }
+
+ ircdproto->SendClientIntroduction(u);
+
+ if (bi)
+ {
+ bi->introduced = true;
for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
ircdproto->SendJoin(bi, (*cit)->chan, &Config->BotModeList);
diff --git a/src/servers.cpp b/src/servers.cpp
index 40d4bc2b2..8c134848b 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -95,15 +95,16 @@ Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const A
{
User *u = it->second;
- ircdproto->SendClientIntroduction(u);
-
BotInfo *bi = findbot(u->nick);
if (bi)
{
- bi->introduced = true;
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(NULL, &x);
}
+
+ ircdproto->SendClientIntroduction(u);
+ if (bi)
+ bi->introduced = true;
}
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)