summaryrefslogtreecommitdiff
path: root/src/messages.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-09-10 15:46:19 -0400
committerAdam <Adam@anope.org>2010-09-10 15:46:19 -0400
commit9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (patch)
tree1dcc4928486a08643af70f69f094ab44c41642e5 /src/messages.cpp
parent46813ccb8c6ab572b8a9ff0a39afb1d92dc4482b (diff)
Fixed bug #1187 - Fixed releasing enforcer clients on TS6 IRCds
Diffstat (limited to 'src/messages.cpp')
-rw-r--r--src/messages.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/messages.cpp b/src/messages.cpp
index 72a926618..84365ccea 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -281,7 +281,7 @@ int m_whois(const Anope::string &source, const Anope::string &who)
{
if (!source.empty() && !who.empty())
{
- NickAlias *na;
+ User *u;
BotInfo *bi = findbot(who);
if (bi)
{
@@ -291,15 +291,11 @@ int m_whois(const Anope::string &source, const Anope::string &who)
ircdproto->SendNumeric(Config->ServerName, 317, source, "%s %ld %ld :seconds idle, signon time", bi->nick.c_str(), time(NULL) - bi->lastmsg, start_time);
ircdproto->SendNumeric(Config->ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
}
- else if (!ircd->svshold && (na = findnick(who)) && na->HasFlag(NS_HELD))
+ else if (!ircd->svshold && (u = finduser(who)) && u->server == Me)
{
- /* We have a nick enforcer client here that we need to respond to.
- * We can't just say it doesn't exist here, even tho it does for
- * other servers :) -GD
- */
- ircdproto->SendNumeric(Config->ServerName, 311, source, "%s %s %s * :Services Enforcer", na->nick.c_str(), Config->NSEnforcerUser.c_str(), Config->NSEnforcerHost.c_str());
- ircdproto->SendNumeric(Config->ServerName, 312, source, "%s %s :%s", na->nick.c_str(), Config->ServerName.c_str(), Config->ServerDesc.c_str());
- ircdproto->SendNumeric(Config->ServerName, 318, source, "%s :End of /WHOIS list.", who.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 311, source, "%s %s %s * :%s", u->nick.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->realname.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 312, source, "%s %s :%s", u->nick.c_str(), Config->ServerName.c_str(), Config->ServerDesc.c_str());
+ ircdproto->SendNumeric(Config->ServerName, 318, source, "%s :End of /WHOIS list.", u->nick.c_str());
}
else
ircdproto->SendNumeric(Config->ServerName, 401, source, "%s :No such service.", who.c_str());