Renamed IsNick to NickEquals

Also added a TODO to add proper IRC case comparing.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
This commit is contained in:
Toon Schoenmakers
2013-10-10 18:36:03 +02:00
parent 83b9a28e4c
commit 9166f5a250
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ public:
void Parse(const CString& sNickMask);
CString GetHostMask() const;
size_t GetCommonChans(std::vector<CChan*>& vChans, CIRCNetwork* pNetwork) const;
bool IsNick(const CString& nickname) const;
bool NickEquals(const CString& nickname) const;
// Setters
void SetNetwork(CIRCNetwork* pNetwork);
+3 -3
View File
@@ -512,7 +512,7 @@ void CIRCSock::ReadLine(const CString& sData) {
}
}
if (Nick.IsNick(GetNick())) {
if (Nick.NickEquals(GetNick())) {
// We are changing our own nick, the clients always must see this!
bIsVisible = false;
SetNick(sNewNick);
@@ -562,7 +562,7 @@ void CIRCSock::ReadLine(const CString& sData) {
CString sChan = sRest.Token(0).TrimPrefix_n();
CChan* pChan;
if (Nick.IsNick(GetNick())) {
if (Nick.NickEquals(GetNick())) {
m_pNetwork->AddChan(sChan, false);
pChan = m_pNetwork->FindChan(sChan);
if (pChan) {
@@ -596,7 +596,7 @@ void CIRCSock::ReadLine(const CString& sData) {
bDetached = true;
}
if (Nick.IsNick(GetNick())) {
if (Nick.NickEquals(GetNick())) {
m_pNetwork->DelChan(sChan);
}
+3 -1
View File
@@ -78,7 +78,9 @@ size_t CNick::GetCommonChans(vector<CChan*>& vRetChans, CIRCNetwork* pNetwork) c
return vRetChans.size();
}
bool CNick::IsNick(const CString& nickname) const {
bool CNick::NickEquals(const CString& nickname) const {
//TODO add proper IRC case mapping here
//https://tools.ietf.org/html/draft-brocklesby-irc-isupport-03#section-3.1
return m_sNick.Equals(nickname);
}