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

@@ -11,6 +11,9 @@
#define VERSION (VERSION_MAJOR + VERSION_MINOR / 10.0)
// You can add -DVERSION_EXTRA="stuff" to your CXXFLAGS!
#ifndef VERSION_EXTRA
# define VERSION_EXTRA ""
#endif
extern const char* ZNC_VERSION_EXTRA;
#endif // !ZNC_VERSION_H

View File

@@ -54,7 +54,7 @@ sed -e 's:#include "defines.h":#include <znc/defines.h>:' third_party/Csocket/Cs
rm make-tarball.sh
sed -e "s/THIS_IS_NOT_TARBALL//" -i Makefile.in
echo '#include <znc/version.h>' > src/version.cpp
echo "const char* ZNC_VERSION_EXTRA = \"$DESC\";" >> src/version.cpp
echo "const char* ZNC_VERSION_EXTRA = VERSION_EXTRA \"$DESC\";" >> src/version.cpp
)
(
cd $TMPDIR

View File

@@ -72,7 +72,7 @@ public:
if (IsOnlineModNick(sNick)) {
CIRCNetwork* pNetwork = GetNetwork();
PutUser(":znc.in 311 " + pNetwork->GetCurNick() + " " + sNick + " " + sNick + " znc.in * :" + sNick);
PutUser(":znc.in 311 " + pNetwork->GetCurNick() + " " + sNick + " znc znc.in * :" + sNick);
PutUser(":znc.in 312 " + pNetwork->GetCurNick() + " " + sNick + " *.znc.in :Bouncer");
PutUser(":znc.in 318 " + pNetwork->GetCurNick() + " " + sNick + " :End of /WHOIS list.");

View File

@@ -141,7 +141,7 @@ void CChan::Cycle() const {
}
void CChan::JoinUser(const CString& sKey) {
if (!sKey.empty()) {
if (!IsOn() && !sKey.empty()) {
SetKey(sKey);
}
m_pNetwork->PutIRC("JOIN " + GetName() + " " + GetKey());

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();

View File

@@ -53,7 +53,7 @@ fi
if [ "x$WRITE_OUTPUT" = "xyes" ]
then
echo '#include <znc/version.h>' > src/version.cpp
echo "const char* ZNC_VERSION_EXTRA = \"$EXTRA\";" >> src/version.cpp
echo "const char* ZNC_VERSION_EXTRA = VERSION_EXTRA \"$EXTRA\";" >> src/version.cpp
fi
echo "$EXTRA"

View File

@@ -40,7 +40,7 @@ LIBZNC_VERSION="@LIBZNC_VERSION@"
if test "x" = "x$LIBZNC"; then
LIBZNCFLAGS=""
else
LIBZNCFLAGS="-L\"$LIBZNCDIR\" -lznc-$LIBZNC_VERSION"
LIBZNCFLAGS="-L$LIBZNCDIR -lznc-$LIBZNC_VERSION"
fi
LDFLAGS="$LIBZNCFLAGS $LDFLAGS"