Replaced the GetNick().Equals() with NickEquals() where possible

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
This commit is contained in:
Toon Schoenmakers
2013-10-10 22:35:49 +02:00
parent 9166f5a250
commit 98ceafb1ba
7 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ protected:
// Is that person us and we don't have op?
const CNick& pNick = Channel.GetNicks().begin()->second;
if (!pNick.HasPerm(CChan::Op) && pNick.GetNick().Equals(m_pNetwork->GetCurNick())) {
if (!pNick.HasPerm(CChan::Op) && pNick.NickEquals(m_pNetwork->GetCurNick())) {
Channel.Cycle();
m_recentlyCycled.AddItem(Channel.GetName());
}
+3 -3
View File
@@ -78,7 +78,7 @@ public:
void OnNick(const CNick& Nick, const CString& sNewNick, const vector<CChan*>& vChans) {
if (sNewNick == m_pNetwork->GetIRCSock()->GetNick()) {
// We are changing our own nick
if (Nick.GetNick().Equals(GetNick())) {
if (Nick.NickEquals(GetNick())) {
// We are changing our nick away from the conf setting.
// Let's assume the user wants this and disable
// this module (to avoid fighting nickserv).
@@ -92,14 +92,14 @@ public:
}
// If the nick we want is free now, be fast and get the nick
if (Nick.GetNick().Equals(GetNick())) {
if (Nick.NickEquals(GetNick())) {
KeepNick();
}
}
void OnQuit(const CNick& Nick, const CString& sMessage, const vector<CChan*>& vChans) {
// If someone with the nick we want quits, be fast and get the nick
if (Nick.GetNick().Equals(GetNick())) {
if (Nick.NickEquals(GetNick())) {
KeepNick();
}
}
+1 -1
View File
@@ -157,7 +157,7 @@ public:
void HandleMessage(CNick& Nick, const CString& sMessage) {
CString sNickServName = (!GetNV("NickServName").empty()) ? GetNV("NickServName") : "NickServ";
if (!GetNV("Password").empty()
&& Nick.GetNick().Equals(sNickServName)
&& Nick.NickEquals(sNickServName)
&& (sMessage.find("msg") != CString::npos
|| sMessage.find("authenticate") != CString::npos
|| sMessage.find("choose a different nickname") != CString::npos
+2 -2
View File
@@ -312,7 +312,7 @@ private:
}
EModRet HandleMessage(const CNick& Nick, CString sMessage) {
if (!Nick.GetNick().Equals("Q") || !Nick.GetHost().Equals("CServe.quakenet.org"))
if (!Nick.NickEquals("Q") || !Nick.GetHost().Equals("CServe.quakenet.org"))
return CONTINUE;
sMessage.Trim();
@@ -418,7 +418,7 @@ private:
}
bool IsSelf(const CNick& Nick) {
return Nick.GetNick().Equals(m_pNetwork->GetCurNick());
return Nick.NickEquals(m_pNetwork->GetCurNick());
}
bool PackHex(const CString& sHex, CString& sPackedHex) {
+3 -3
View File
@@ -297,7 +297,7 @@ public:
{
AddBuffer(*vChans[a], SpoofChanMsg(vChans[a]->GetName(), cNick.GetNickMask() + " QUIT " + sMessage));
}
if (cNick.GetNick().Equals(m_pUser->GetNick()))
if (cNick.NickEquals(m_pUser->GetNick()))
SaveBufferToDisk(); // need to force a save here to see this!
}
@@ -314,7 +314,7 @@ public:
}
virtual void OnJoin(const CNick& cNick, CChan& cChannel)
{
if (cNick.GetNick().Equals(m_pUser->GetNick()) && cChannel.GetBuffer().empty())
if (cNick.NickEquals(m_pUser->GetNick()) && cChannel.GetBuffer().empty())
{
BootStrap((CChan *)&cChannel);
if (!cChannel.GetBuffer().empty())
@@ -325,7 +325,7 @@ public:
virtual void OnPart(const CNick& cNick, CChan& cChannel)
{
AddBuffer(cChannel, SpoofChanMsg(cChannel.GetName(), cNick.GetNickMask() + " PART"));
if (cNick.GetNick().Equals(m_pUser->GetNick()))
if (cNick.NickEquals(m_pUser->GetNick()))
SaveBufferToDisk(); // need to force a save here to see this!
}
#endif /* LEGACY_SAVEBUFF */
+3 -3
View File
@@ -286,13 +286,13 @@ void CChan::ModeChange(const CString& sModes, const CNick* pOpNick) {
if (bAdd) {
pNick->AddPerm(uPerm);
if (pNick->GetNick().Equals(m_pNetwork->GetCurNick())) {
if (pNick->NickEquals(m_pNetwork->GetCurNick())) {
AddPerm(uPerm);
}
} else {
pNick->RemPerm(uPerm);
if (pNick->GetNick().Equals(m_pNetwork->GetCurNick())) {
if (pNick->NickEquals(m_pNetwork->GetCurNick())) {
RemPerm(uPerm);
}
}
@@ -464,7 +464,7 @@ bool CChan::AddNick(const CString& sNick) {
pNick->AddPerm(sPrefix[i]);
}
if (pNick->GetNick().Equals(m_pNetwork->GetCurNick())) {
if (pNick->NickEquals(m_pNetwork->GetCurNick())) {
for (CString::size_type i = 0; i < sPrefix.length(); i++) {
AddPerm(sPrefix[i]);
}
+2 -2
View File
@@ -530,7 +530,7 @@ void CIRCSock::ReadLine(const CString& sData) {
// :nick!ident@host.com QUIT :message
if (Nick.GetNick().Equals(GetNick())) {
if (Nick.NickEquals(GetNick())) {
m_pNetwork->PutStatus("You quit [" + sMessage + "]");
// We don't call module hooks and we don't
// forward this quit to clients (Some clients
@@ -700,7 +700,7 @@ void CIRCSock::ReadLine(const CString& sData) {
}
}
if (Nick.GetNick().Equals(m_pNetwork->GetIRCServer())) {
if (Nick.NickEquals(m_pNetwork->GetIRCServer())) {
m_pNetwork->PutUser(":" + Nick.GetNick() + " NOTICE " + sTarget + " :" + sMsg);
} else {
m_pNetwork->PutUser(":" + Nick.GetNickMask() + " NOTICE " + sTarget + " :" + sMsg);