mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge branch '1.6.x'
Conflicts: src/Client.cpp znc-buildmod.in
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user