mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Implemented a nick compare function
As suggested by the todos in IRCSock, added IsNick(CString) method so the ugly Nick.GetNick().Equals(GetNick()) could be simplified. Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
This commit is contained in:
@@ -512,8 +512,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
}
|
||||
}
|
||||
|
||||
// Todo: use nick compare function here
|
||||
if (Nick.GetNick().Equals(GetNick())) {
|
||||
if (Nick.IsNick(GetNick())) {
|
||||
// We are changing our own nick, the clients always must see this!
|
||||
bIsVisible = false;
|
||||
SetNick(sNewNick);
|
||||
@@ -563,8 +562,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
CString sChan = sRest.Token(0).TrimPrefix_n();
|
||||
CChan* pChan;
|
||||
|
||||
// Todo: use nick compare function
|
||||
if (Nick.GetNick().Equals(GetNick())) {
|
||||
if (Nick.IsNick(GetNick())) {
|
||||
m_pNetwork->AddChan(sChan, false);
|
||||
pChan = m_pNetwork->FindChan(sChan);
|
||||
if (pChan) {
|
||||
@@ -598,8 +596,7 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
bDetached = true;
|
||||
}
|
||||
|
||||
// Todo: use nick compare function
|
||||
if (Nick.GetNick().Equals(GetNick())) {
|
||||
if (Nick.IsNick(GetNick())) {
|
||||
m_pNetwork->DelChan(sChan);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user