Merge branch '1.6.x'

Conflicts:
	src/Client.cpp
	znc-buildmod.in
This commit is contained in:
J-P Nurmi
2015-07-31 23:53:30 +02:00
7 changed files with 22 additions and 9 deletions

View File

@@ -431,13 +431,19 @@ void CClient::ReadLine(const CString& sData) {
return;
} else if (sCommand.Equals("JOIN")) {
CString sChans = sLine.Token(1).TrimPrefix_n();
CString sKey = sLine.Token(2);
CString sKeys = sLine.Token(2);
VCString vsChans;
sChans.Split(",", vsChans, false);
sChans.clear();
for (CString& sChannel : vsChans) {
VCString vsKeys;
sKeys.Split(",", vsKeys, true);
sKeys.clear();
for (unsigned int a = 0; a < vsChans.size(); a++) {
CString sChannel = vsChans[a];
CString sKey = (a < vsKeys.size()) ? vsKeys[a] : "";
bool bContinue = false;
NETWORKMODULECALL(OnUserJoin(sChannel, sKey), m_pUser, m_pNetwork, this, &bContinue);
if (bContinue) continue;
@@ -453,6 +459,10 @@ void CClient::ReadLine(const CString& sData) {
if (!sChannel.empty()) {
sChans += (sChans.empty()) ? sChannel : CString("," + sChannel);
if (!vsKeys.empty()) {
sKeys += (sKeys.empty()) ? sKey : CString("," + sKey);
}
}
}
@@ -462,8 +472,8 @@ void CClient::ReadLine(const CString& sData) {
sLine = "JOIN " + sChans;
if (!sKey.empty()) {
sLine += " " + sKey;
if (!sKeys.empty()) {
sLine += " " + sKeys;
}
} else if (sCommand.Equals("PART")) {
CString sChans = sLine.Token(1).TrimPrefix_n();