mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge branch 'master' of github.com:znc/znc
This commit is contained in:
@@ -96,6 +96,7 @@ public:
|
||||
|
||||
virtual ~CClient();
|
||||
|
||||
void SendRequiredPasswordNotice();
|
||||
void AcceptLogin(CUser& User);
|
||||
void RefuseLogin(const CString& sReason);
|
||||
|
||||
|
||||
@@ -271,6 +271,8 @@ void CChan::ModeChange(const CString& sModes, const CNick* pOpNick) {
|
||||
unsigned char uPerm = m_pNetwork->GetIRCSock()->GetPermFromMode(uMode);
|
||||
|
||||
if (uPerm) {
|
||||
bool bNoChange = (pNick->HasPerm(uPerm) == bAdd);
|
||||
|
||||
if (bAdd) {
|
||||
pNick->AddPerm(uPerm);
|
||||
|
||||
@@ -284,7 +286,6 @@ void CChan::ModeChange(const CString& sModes, const CNick* pOpNick) {
|
||||
RemPerm(uPerm);
|
||||
}
|
||||
}
|
||||
bool bNoChange = (pNick->HasPerm(uPerm) == bAdd);
|
||||
|
||||
if (uMode && pOpNick) {
|
||||
NETWORKMODULECALL(OnChanPermission(*pOpNick, *pNick, *this, uMode, bAdd, bNoChange), m_pNetwork->GetUser(), m_pNetwork, NULL, NOTHING);
|
||||
|
||||
@@ -69,6 +69,13 @@ CClient::~CClient() {
|
||||
}
|
||||
}
|
||||
|
||||
void CClient::SendRequiredPasswordNotice() {
|
||||
PutClient(":irc.znc.in 464 " + GetNick() + " :Password required");
|
||||
PutClient(":irc.znc.in NOTICE AUTH :*** "
|
||||
"You need to send your password. "
|
||||
"Try /quote PASS <username>:<password>");
|
||||
}
|
||||
|
||||
void CClient::ReadLine(const CString& sData) {
|
||||
CString sLine = sData;
|
||||
|
||||
@@ -132,11 +139,8 @@ void CClient::ReadLine(const CString& sData) {
|
||||
m_bGotUser = true;
|
||||
if (m_bGotPass) {
|
||||
AuthUser();
|
||||
} else {
|
||||
PutClient(":irc.znc.in 464 " + GetNick() + " :Password required");
|
||||
PutClient(":irc.znc.in NOTICE AUTH :*** "
|
||||
"You need to send your password. "
|
||||
"Try /quote PASS <username>:<password>");
|
||||
} else if (!m_bInCap) {
|
||||
SendRequiredPasswordNotice();
|
||||
}
|
||||
|
||||
return; // Don't forward this msg. ZNC has already registered us.
|
||||
@@ -808,7 +812,13 @@ void CClient::HandleCap(const CString& sLine)
|
||||
m_bInCap = true;
|
||||
} else if (sSubCmd.Equals("END")) {
|
||||
m_bInCap = false;
|
||||
AuthUser();
|
||||
if (!IsAttached()) {
|
||||
if (!m_pUser && m_bGotUser && !m_bGotPass) {
|
||||
SendRequiredPasswordNotice();
|
||||
} else {
|
||||
AuthUser();
|
||||
}
|
||||
}
|
||||
} else if (sSubCmd.Equals("REQ")) {
|
||||
VCString vsTokens;
|
||||
VCString::iterator it;
|
||||
|
||||
Reference in New Issue
Block a user