summaryrefslogtreecommitdiff
path: root/protocols/IRCG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
commit500dd4848842f6d4207584417448586d060fbd6a (patch)
tree569ac641e814da1d706d36b12eaf35183a3ce7a5 /protocols/IRCG
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'protocols/IRCG')
-rw-r--r--protocols/IRCG/src/clist.cpp12
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp6
-rw-r--r--protocols/IRCG/src/services.cpp4
3 files changed, 11 insertions, 11 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index 5164ea6ffa..c3f24b5dfd 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -31,7 +31,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas
CONTACT usertemp = { name, nullptr, nullptr, false, false, true };
MCONTACT hc = CList_FindContact(&usertemp);
- if (hc && Contact_OnList(hc) && !Contact_IsHidden(hc))
+ if (hc && Contact::OnList(hc) && !Contact::IsHidden(hc))
bFlag = true;
CMStringW contactname = name; contactname += DCCSTRING;
@@ -88,9 +88,9 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
MCONTACT hContact = CList_FindContact(user);
if (hContact) {
if (InList)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
setWString(hContact, "Nick", user->name);
- Contact_Hide(hContact, false);
+ Contact::Hide(hContact, false);
if (SetOnline && getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
return hContact;
@@ -102,10 +102,10 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
Proto_AddToContact(hContact, m_szModuleName);
if (InList)
- Contact_PutOnList(hContact);
+ Contact::PutOnList(hContact);
else
- Contact_RemoveFromList(hContact);
- Contact_Hide(hContact, false);
+ Contact::RemoveFromList(hContact);
+ Contact::Hide(hContact, false);
setWString(hContact, "Nick", user->name);
setWString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE);
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index c9014b413f..ab9a7e646f 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -146,7 +146,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
continue;
uint8_t bDCC = ppro->getByte(hContact, "DCC", 0);
- bool bHidden = Contact_IsHidden(hContact);
+ bool bHidden = Contact::IsHidden(hContact);
if (bDCC || bHidden)
continue;
if (ppro->getWString(hContact, "Default", &dbv))
@@ -682,7 +682,7 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage *pmsg)
if ((m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))) {
MCONTACT hContact = CList_FindContact(&user);
- if (!hContact || (hContact && Contact_IsHidden(hContact)))
+ if (!hContact || (hContact && Contact::IsHidden(hContact)))
return true;
}
@@ -1051,7 +1051,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage *pmsg)
MCONTACT hContact = CList_FindContact(&user);
// check if it should be ignored
- if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && Contact_OnList(hContact) && !Contact_IsHidden(hContact)) {
+ if (m_DCCChatIgnore == 1 || m_DCCChatIgnore == 2 && hContact && Contact::OnList(hContact) && !Contact::IsHidden(hContact)) {
CMStringW host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
CList_AddDCCChat(pmsg->prefix.sNick, host, dwAdr, iPort); // add a CHAT event to the clist
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index af047b0530..0564c7d538 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -671,7 +671,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam)
psr.flags = PSR_UNICODE;
psr.id.w = gch->ptszUID;
psr.nick.w = gch->ptszUID;
- Contact_AddBySearch(m_szModuleName, &psr);
+ Contact::AddBySearch(m_szModuleName, &psr);
}
break;
case 31: //slap
@@ -778,7 +778,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam)
CONTACT user = { (wchar_t*)gcmi->pszUID, nullptr, nullptr, false, false, false };
MCONTACT hContact = CList_FindContact(&user);
- BOOL bIsInList = hContact && Contact_OnList(hContact);
+ BOOL bIsInList = hContact && Contact::OnList(hContact);
nickItems[_countof(nickItems)-1].bDisabled = bIsInList;
unsigned long ulAdr = 0;