Made fakeonline behave properly when ZNC is not connected to any IRC server. Reported by devilspgd's imaginary girl friend. Patch by MEEEEE!!

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2091 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-07-21 17:53:07 +00:00
parent f7c6d90478
commit eafccc7b7d
+10 -4
View File
@@ -36,7 +36,7 @@ public:
// Get the list of nicks which are being asked for
sLine.Token(1, true).TrimLeft_n(":").Split(" ", vsNicks, false);
CString sBNCNicks = "";
CString sBNCNicks;
for (it = vsNicks.begin(); it != vsNicks.end(); ++it) {
if (IsOnlineModNick(*it)) {
sBNCNicks += " " + *it;
@@ -45,9 +45,15 @@ public:
// Remove the leading space
sBNCNicks.LeftChomp();
// We let the server handle this request and then act on
// the 303 response.
m_ISONRequests.push_back(sBNCNicks);
if (!m_pUser->GetIRCSock()) {
// if we are not connected to any IRC server, send
// an empty or module-nick filled response.
PutUser(":irc.znc.in 303 " + m_pUser->GetNick() + " :" + sBNCNicks);
} else {
// We let the server handle this request and then act on
// the 303 response from the IRC server.
m_ISONRequests.push_back(sBNCNicks);
}
}
//Handle WHOIS