mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Added bForce to KeepNick() to be used when your original nick quits or changes nicks.. no need to wait for pending
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@374 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-4
@@ -386,7 +386,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
if (sNick.CaseCmp(GetNick()) == 0) {
|
||||
SetNick(sNewNick);
|
||||
} else if (sNick.CaseCmp(m_pUser->GetNick()) == 0) {
|
||||
KeepNick();
|
||||
KeepNick(true);
|
||||
}
|
||||
|
||||
VOIDMODULECALL(OnNick(sNickMask, sNewNick, vFoundChans));
|
||||
@@ -421,7 +421,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
|
||||
if (Nick.GetNick().CaseCmp(m_pUser->GetNick()) == 0) {
|
||||
KeepNick();
|
||||
KeepNick(true);
|
||||
}
|
||||
|
||||
VOIDMODULECALL(OnQuit(Nick, sMessage, vFoundChans));
|
||||
@@ -602,11 +602,11 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
PutUser(sLine);
|
||||
}
|
||||
|
||||
void CIRCSock::KeepNick() {
|
||||
void CIRCSock::KeepNick(bool bForce) {
|
||||
const CString& sConfNick = m_pUser->GetNick();
|
||||
CString sAwayNick = CNick::Concat(sConfNick, m_pUser->GetAwaySuffix(), GetMaxNickLen());
|
||||
|
||||
if (m_bAuthed && m_bKeepNick && !IsOrigNickPending() && m_pUser->GetKeepNick() && GetNick().CaseCmp(sConfNick) != 0 && GetNick().CaseCmp(sAwayNick) != 0) {
|
||||
if (m_bAuthed && m_bKeepNick && (!IsOrigNickPending() || bForce) && m_pUser->GetKeepNick() && GetNick().CaseCmp(sConfNick) != 0 && GetNick().CaseCmp(sAwayNick) != 0) {
|
||||
PutServ("NICK " + sConfNick);
|
||||
SetOrigNickPending(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user