mirror of
https://github.com/znc/znc.git
synced 2026-08-01 22:43:05 +02:00
Remove KeepNick
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1151 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+2
-34
@@ -84,26 +84,9 @@ void CClient::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
if (!m_pIRCSock) {
|
||||
// No need to check against IRC nick or to forward it
|
||||
// No need to forward it
|
||||
return;
|
||||
}
|
||||
|
||||
if ((m_pUser) && (sNick.CaseCmp(m_pUser->GetNick()) == 0)) {
|
||||
m_uKeepNickCounter++;
|
||||
// If the user is changing his nick to the conifg nick, set keepnick to the config value
|
||||
if (m_pUser->GetKeepNick() && !m_pIRCSock->GetKeepNick()) {
|
||||
m_pIRCSock->SetKeepNick(true);
|
||||
PutStatusNotice("Reset KeepNick back to true");
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pUser && GetNick().CaseCmp(m_pUser->GetNick()) == 0) {
|
||||
// If the user changes his nick away from the config nick, we shut off keepnick for this session
|
||||
if (m_pUser->GetKeepNick()) {
|
||||
m_pIRCSock->SetKeepNick(false);
|
||||
PutStatusNotice("Set KeepNick to false");
|
||||
}
|
||||
}
|
||||
} else if (sCommand.CaseCmp("USER") == 0) {
|
||||
if (!IsAttached()) {
|
||||
if (m_sUser.empty()) {
|
||||
@@ -593,22 +576,7 @@ void CClient::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
void CClient::SetNick(const CString& s) {
|
||||
m_sNick = s;
|
||||
|
||||
if (m_pUser) {
|
||||
if (m_sNick.CaseCmp(m_pUser->GetNick()) == 0) {
|
||||
m_uKeepNickCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CClient::DecKeepNickCounter() {
|
||||
if (!m_uKeepNickCounter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_uKeepNickCounter--;
|
||||
return true;
|
||||
m_sNick = s;
|
||||
}
|
||||
|
||||
void CClient::StatusCTCP(const CString& sLine) {
|
||||
|
||||
Reference in New Issue
Block a user