summaryrefslogtreecommitdiff
path: root/protocols/IRCG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /protocols/IRCG
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG')
-rw-r--r--protocols/IRCG/src/clist.cpp32
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp30
-rw-r--r--protocols/IRCG/src/input.cpp10
-rw-r--r--protocols/IRCG/src/irc.h158
-rw-r--r--protocols/IRCG/src/irclib.cpp6
-rw-r--r--protocols/IRCG/src/irclib.h16
-rw-r--r--protocols/IRCG/src/ircproto.cpp48
-rw-r--r--protocols/IRCG/src/scripting.cpp6
-rw-r--r--protocols/IRCG/src/services.cpp42
-rw-r--r--protocols/IRCG/src/ui_utils.cpp4
-rw-r--r--protocols/IRCG/src/ui_utils.h4
-rw-r--r--protocols/IRCG/src/userinfo.cpp12
12 files changed, 183 insertions, 185 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index f95dc36351..54ade38cac 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -24,14 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, unsigned long adr, int port)
{
- HANDLE hContact;
- HANDLE hc;
+ HCONTACT hContact;
TCHAR szNick[256];
char szService[256];
bool bFlag = false;
CONTACT usertemp = { (TCHAR*)name.c_str(), NULL, NULL, false, false, true };
- hc = CList_FindContact(&usertemp);
+ HCONTACT hc = CList_FindContact(&usertemp);
if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && db_get_b(hc, "CList", "Hidden", 0) == 0)
bFlag = true;
@@ -63,9 +62,8 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask,
PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), name.c_str());
}
else {
- CLISTEVENT cle = { 0 };
- cle.cbSize = sizeof(cle);
- cle.hContact = (HANDLE)hContact;
+ CLISTEVENT cle = { sizeof(cle) };
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)"dccchat";
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadIconEx(IDI_DCC);
@@ -82,12 +80,12 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask,
return TRUE;
}
-HANDLE CIrcProto::CList_AddContact(CONTACT * user, bool InList, bool SetOnline)
+HCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
{
if (user->name == NULL)
return 0;
- HANDLE hContact = CList_FindContact(user);
+ HCONTACT hContact = CList_FindContact(user);
if (hContact) {
if (InList)
db_unset(hContact, "CList", "NotOnList");
@@ -99,7 +97,7 @@ HANDLE CIrcProto::CList_AddContact(CONTACT * user, bool InList, bool SetOnline)
}
// here we create a new one since no one is to be found
- hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
@@ -118,9 +116,9 @@ HANDLE CIrcProto::CList_AddContact(CONTACT * user, bool InList, bool SetOnline)
return false;
}
-HANDLE CIrcProto::CList_SetOffline(struct CONTACT * user)
+HCONTACT CIrcProto::CList_SetOffline(CONTACT *user)
{
- HANDLE hContact = CList_FindContact(user);
+ HCONTACT hContact = CList_FindContact(user);
if (hContact) {
DBVARIANT dbv;
if (!getTString(hContact, "Default", &dbv)) {
@@ -142,7 +140,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo)
DisconnectAllDCCSessions(false);
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
@@ -162,7 +160,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo)
return true;
}
-HANDLE CIrcProto::CList_FindContact(CONTACT* user)
+HCONTACT CIrcProto::CList_FindContact(CONTACT *user)
{
if (!user || !user->name)
return 0;
@@ -170,11 +168,11 @@ HANDLE CIrcProto::CList_FindContact(CONTACT* user)
TCHAR* lowercasename = mir_tstrdup(user->name);
CharLower(lowercasename);
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
- HANDLE hContact_temp = NULL;
+ HCONTACT hContact_temp = NULL;
ptrT DBNick(getTStringA(hContact, "Nick"));
ptrT DBUser(getTStringA(hContact, "UUser"));
ptrT DBHost(getTStringA(hContact, "UHost"));
@@ -185,7 +183,7 @@ HANDLE CIrcProto::CList_FindContact(CONTACT* user)
CharLower(DBWildcard);
if (IsChannel(user->name)) {
if (DBDefault && !lstrcmpi(DBDefault, user->name))
- hContact_temp = (HANDLE)-1;
+ hContact_temp = (HCONTACT)-1;
}
else if (user->ExactNick && DBNick && !lstrcmpi(DBNick, user->name))
hContact_temp = hContact;
@@ -210,7 +208,7 @@ HANDLE CIrcProto::CList_FindContact(CONTACT* user)
if (hContact_temp != NULL) {
mir_free(lowercasename);
- if (hContact_temp != (HANDLE)-1)
+ if (hContact_temp != (HCONTACT)-1)
return hContact_temp;
return 0;
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index c67304d98d..41556d434e 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -98,7 +98,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD)
int count = (int)CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)ppro->m_szModuleName);
for (int i = 0; i < count; i++) {
GC_INFO gci = { 0 };
- gci.Flags = BYINDEX | NAME | TYPE | COUNT;
+ gci.Flags = GCF_BYINDEX | GCF_NAME | GCF_TYPE | GCF_COUNT;
gci.iItem = i;
gci.pszModule = ppro->m_szModuleName;
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM)
@@ -140,7 +140,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
if (name.IsEmpty() && name2.IsEmpty()) {
DBVARIANT dbv;
- for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
if (ppro->isChatRoom(hContact))
continue;
@@ -215,7 +215,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
ppro->SetChatTimer(ppro->OnlineNotifTimer, ppro->m_onlineNotificationTime * 1000, OnlineNotifTimerProc);
}
-int CIrcProto::AddOutgoingMessageToDB(HANDLE hContact, TCHAR* msg)
+int CIrcProto::AddOutgoingMessageToDB(HCONTACT hContact, TCHAR* msg)
{
if (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_CONNECTING)
return 0;
@@ -582,7 +582,7 @@ bool CIrcProto::OnIrc_NICK(const CIrcMessage* pmsg)
DoEvent(GC_EVENT_CHUID, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, NULL, NULL, true, false);
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (hContact) {
if (getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
@@ -615,7 +615,7 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg)
S2 = pmsg->parameters[0].c_str();
else {
GC_INFO gci = { 0 };
- gci.Flags = BYID | TYPE;
+ gci.Flags = GCF_BYID | GCF_TYPE;
gci.pszModule = m_szModuleName;
CMString S3 = GetWord(pmsg->parameters[1].c_str(), 0);
@@ -696,12 +696,12 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage* pmsg)
return true;
if ((m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))) {
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (!hContact || (hContact && db_get_b(hContact, "CList", "Hidden", 0) == 1))
return true;
}
- HANDLE hContact = CList_AddContact(&user, false, true);
+ HCONTACT hContact = CList_AddContact(&user, false, true);
PROTORECVEVENT pre = { 0 };
pre.timestamp = (DWORD)time(NULL);
@@ -1066,7 +1066,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg)
// incoming chat request
if (bIsChat) {
CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), 0, 0, false, false, true };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
// check if it should be ignored
if (m_DCCChatIgnore == 1 ||
@@ -1139,7 +1139,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg)
if (!CList_FindContact(&user))
return true;
- HANDLE hContact = CList_AddContact(&user, false, true);
+ HCONTACT hContact = CList_AddContact(&user, false, true);
if (hContact) {
DCCINFO* di = new DCCINFO;
di->hContact = hContact;
@@ -1188,7 +1188,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg)
//if we got incoming CTCP Version for contact in CList - then write its as MirVer for that contact!
if (pmsg->m_bIncoming && command == _T("version")) {
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (hContact)
setTString(hContact, "MirVer", DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE));
}
@@ -1688,7 +1688,7 @@ bool CIrcProto::OnIrc_WHOIS_END(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 && m_manualWhoisCount < 1) {
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, true };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (hContact)
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)WhoisAwayReply.c_str());
}
@@ -1767,7 +1767,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg)
m_whoisDlg->ShowMessageNoUser(pmsg);
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (hContact) {
AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str());
@@ -1949,7 +1949,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg)
const TCHAR* p1 = UserList;
m_whoReply = _T("");
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
if (hContact && getByte(hContact, "AdvancedMode", 0) == 1) {
ptrT DBHost(getTStringA(hContact, "UHost"));
@@ -2118,7 +2118,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg)
finduser.host = (TCHAR*)host.c_str();
finduser.user = (TCHAR*)user.c_str();
- HANDLE hContact = CList_FindContact(&finduser);
+ HCONTACT hContact = CList_FindContact(&finduser);
if (hContact && getByte(hContact, "AdvancedMode", 0) == 0) {
setWord(hContact, "Status", awaystatus == '-' ? ID_STATUS_AWAY : ID_STATUS_ONLINE);
setTString(hContact, "User", user.c_str());
@@ -2370,7 +2370,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*)
int count = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName);
for (int i = 0; i < count; i++) {
GC_INFO gci = { 0 };
- gci.Flags = BYINDEX | DATA | NAME | TYPE;
+ gci.Flags = GCF_BYINDEX | GCF_DATA | GCF_NAME | GCF_TYPE;
gci.iItem = i;
gci.pszModule = m_szModuleName;
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) {
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp
index b11400f6d2..a78fabf304 100644
--- a/protocols/IRCG/src/input.cpp
+++ b/protocols/IRCG/src/input.cpp
@@ -212,7 +212,7 @@ static void __stdcall sttSetTimerOff(void* _pro)
ppro->KillChatTimer(ppro->OnlineNotifTimer3);
}
-BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HANDLE hContact)
+BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HCONTACT hContact)
{
TCHAR temp[30];
lstrcpyn(temp, GetWord(text.c_str(), 0).c_str(), 29);
@@ -371,7 +371,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HANDLE hContact
TCHAR szTemp[40];
CMString S = MakeWndID(window);
GC_INFO gci = { 0 };
- gci.Flags = BYID | NAME | COUNT;
+ gci.Flags = GCF_BYID | GCF_NAME | GCF_COUNT;
gci.pszModule = m_szModuleName;
gci.pszID = S.c_str();
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
@@ -628,7 +628,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HANDLE hContact
if (ulAdr) {
CONTACT user = { (TCHAR*)two.c_str(), NULL, NULL, false, false, true };
- HANDLE hContact = CList_AddContact(&user, false, false);
+ HCONTACT hContact = CList_AddContact(&user, false, false);
if (hContact) {
CMString s;
@@ -679,7 +679,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HANDLE hContact
if (ulAdr) {
CMString contact = two; contact += _T(DCCSTRING);
CONTACT user = { (TCHAR*)contact.c_str(), NULL, NULL, false, false, true };
- HANDLE hContact = CList_AddContact(&user, false, false);
+ HCONTACT hContact = CList_AddContact(&user, false, false);
setByte(hContact, "DCC", 1);
int iPort = 0;
@@ -805,7 +805,7 @@ bool CIrcProto::PostIrcMessage(const TCHAR* fmt, ...)
return PostIrcMessageWnd(NULL, NULL, szBuf);
}
-bool CIrcProto::PostIrcMessageWnd(TCHAR* window, HANDLE hContact, const TCHAR* szBuf)
+bool CIrcProto::PostIrcMessageWnd(TCHAR* window, HCONTACT hContact, const TCHAR* szBuf)
{
DBVARIANT dbv;
TCHAR windowname[256];
diff --git a/protocols/IRCG/src/irc.h b/protocols/IRCG/src/irc.h
index 4e963e743c..cf351b65a5 100644
--- a/protocols/IRCG/src/irc.h
+++ b/protocols/IRCG/src/irc.h
@@ -217,76 +217,76 @@ struct CIrcProto : public PROTO<CIrcProto>
virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
- virtual int __cdecl Authorize( HANDLE hContact );
- virtual int __cdecl AuthDeny( HANDLE hContact, const TCHAR* szReason );
- virtual int __cdecl AuthRecv( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest( HANDLE hContact, const TCHAR* szMessage );
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
- virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
+ virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
- virtual HANDLE __cdecl FileAllow( HANDLE hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel( HANDLE hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny( HANDLE hContact, HANDLE hTransfer, const TCHAR* szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
+ virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
- virtual DWORD_PTR __cdecl GetCaps( int type, HANDLE hContact = NULL );
- virtual int __cdecl GetInfo( HANDLE hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
- virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
- virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
- virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile( HANDLE hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl( HANDLE hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts( HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList );
- virtual HANDLE __cdecl SendFile( HANDLE hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg( HANDLE hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl( HANDLE hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode( HANDLE hContact, int mode );
- virtual int __cdecl SetStatus( int iNewStatus );
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg( HANDLE hContact );
- virtual int __cdecl RecvAwayMsg( HANDLE hContact, int mode, PROTORECVEVENT* evt );
- virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping( HANDLE hContact, int type );
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
// Services
- INT_PTR __cdecl SvcCreateAccMgrUI( WPARAM, LPARAM );
- INT_PTR __cdecl GetMyAwayMsg( WPARAM, LPARAM );
-
- INT_PTR __cdecl OnChangeNickMenuCommand( WPARAM, LPARAM );
- INT_PTR __cdecl OnDoubleclicked( WPARAM, LPARAM );
- INT_PTR __cdecl OnJoinChat( WPARAM, LPARAM );
- INT_PTR __cdecl OnJoinMenuCommand( WPARAM, LPARAM );
- INT_PTR __cdecl OnLeaveChat( WPARAM, LPARAM );
- INT_PTR __cdecl OnMenuChanSettings( WPARAM, LPARAM );
+ INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM);
+ INT_PTR __cdecl GetMyAwayMsg(WPARAM, LPARAM);
+
+ INT_PTR __cdecl OnChangeNickMenuCommand(WPARAM, LPARAM);
+ INT_PTR __cdecl OnDoubleclicked(WPARAM, LPARAM);
+ INT_PTR __cdecl OnJoinChat(WPARAM, LPARAM);
+ INT_PTR __cdecl OnJoinMenuCommand(WPARAM, LPARAM);
+ INT_PTR __cdecl OnLeaveChat(WPARAM, LPARAM);
+ INT_PTR __cdecl OnMenuChanSettings(WPARAM, LPARAM);
INT_PTR __cdecl OnMenuDisconnect( WPARAM , LPARAM );
- INT_PTR __cdecl OnMenuIgnore( WPARAM, LPARAM );
- INT_PTR __cdecl OnMenuWhois( WPARAM, LPARAM );
+ INT_PTR __cdecl OnMenuIgnore(WPARAM, LPARAM);
+ INT_PTR __cdecl OnMenuWhois(WPARAM, LPARAM);
INT_PTR __cdecl OnQuickConnectMenuCommand(WPARAM, LPARAM );
- INT_PTR __cdecl OnShowListMenuCommand( WPARAM, LPARAM );
- INT_PTR __cdecl OnShowServerMenuCommand( WPARAM, LPARAM );
+ INT_PTR __cdecl OnShowListMenuCommand(WPARAM, LPARAM);
+ INT_PTR __cdecl OnShowServerMenuCommand(WPARAM, LPARAM);
// Events
- int __cdecl OnContactDeleted( WPARAM, LPARAM );
- int __cdecl OnInitOptionsPages( WPARAM, LPARAM );
- int __cdecl OnInitUserInfo( WPARAM, LPARAM );
- int __cdecl OnModulesLoaded( WPARAM, LPARAM );
- int __cdecl OnMenuPreBuild( WPARAM, LPARAM );
- int __cdecl OnPreShutdown( WPARAM, LPARAM );
- int __cdecl OnDbSettingChanged( WPARAM, LPARAM );
+ int __cdecl OnContactDeleted(WPARAM, LPARAM);
+ int __cdecl OnInitOptionsPages(WPARAM, LPARAM);
+ int __cdecl OnInitUserInfo(WPARAM, LPARAM);
+ int __cdecl OnModulesLoaded(WPARAM, LPARAM);
+ int __cdecl OnMenuPreBuild(WPARAM, LPARAM);
+ int __cdecl OnPreShutdown(WPARAM, LPARAM);
+ int __cdecl OnDbSettingChanged(WPARAM, LPARAM);
- int __cdecl GCEventHook( WPARAM, LPARAM );
- int __cdecl GCMenuHook( WPARAM, LPARAM );
+ int __cdecl GCEventHook(WPARAM, LPARAM);
+ int __cdecl GCMenuHook(WPARAM, LPARAM);
// Data
@@ -389,46 +389,46 @@ struct CIrcProto : public PROTO<CIrcProto>
CDlgBase::CreateParam OptCreateAccount, OptCreateConn, OptCreateIgnore, OptCreateOther;
//clist.cpp
- HANDLE CList_AddContact(struct CONTACT * user, bool InList, bool SetOnline);
- bool CList_SetAllOffline(BYTE ChatsToo);
- HANDLE CList_SetOffline(struct CONTACT * user);
+ HCONTACT CList_AddContact(CONTACT *user, bool InList, bool SetOnline);
+ bool CList_SetAllOffline(BYTE ChatsToo);
+ HCONTACT CList_SetOffline(CONTACT *user);
- bool CList_AddEvent(struct CONTACT * user, HICON Icon, HANDLE event, const char * tooltip, int type ) ;
- HANDLE CList_FindContact (struct CONTACT * user);
- BOOL CList_AddDCCChat(const CMString& name, const CMString& hostmask, unsigned long adr, int port) ;
+ bool CList_AddEvent(CONTACT *user, HICON Icon, HANDLE event, const char *tooltip, int type ) ;
+ HCONTACT CList_FindContact(CONTACT *user);
+ BOOL CList_AddDCCChat(const CMString &name, const CMString &hostmask, unsigned long adr, int port) ;
//commandmonitor.cpp
UINT_PTR IdentTimer, InitTimer, KeepAliveTimer, OnlineNotifTimer, OnlineNotifTimer3;
- int AddOutgoingMessageToDB(HANDLE hContact, TCHAR* msg);
+ int AddOutgoingMessageToDB(HCONTACT hContact, TCHAR *msg);
bool DoOnConnect(const CIrcMessage *pmsg);
- int DoPerform(const char* event);
- void __cdecl ResolveIPThread( void* di );
+ int DoPerform(const char *event);
+ void __cdecl ResolveIPThread(void *di);
- bool AddIgnore(const TCHAR* mask, const TCHAR* mode, const TCHAR* network) ;
- int IsIgnored(const CMString& nick, const CMString& address, const CMString& host, char type) ;
+ bool AddIgnore(const TCHAR *mask, const TCHAR *mode, const TCHAR *network) ;
+ int IsIgnored(const CMString &nick, const CMString &address, const CMString &host, char type) ;
int IsIgnored(CMString user, char type);
- bool RemoveIgnore(const TCHAR* mask) ;
+ bool RemoveIgnore(const TCHAR *mask) ;
//input.cpp
CMString DoAlias( const TCHAR *text, TCHAR *window);
- BOOL DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContact );
- CMString DoIdentifiers( CMString text, const TCHAR* window );
- void FormatMsg(CMString& text);
- bool PostIrcMessageWnd(TCHAR* pszWindow, HANDLE hContact,const TCHAR* szBuf);
- bool PostIrcMessage( const TCHAR* fmt, ...);
+ BOOL DoHardcodedCommand(CMString text, TCHAR *window, HCONTACT hContact);
+ CMString DoIdentifiers(CMString text, const TCHAR *window);
+ void FormatMsg(CMString &text);
+ bool PostIrcMessageWnd(TCHAR *pszWindow, HCONTACT hContact, const TCHAR *szBuf);
+ bool PostIrcMessage(const TCHAR *fmt, ...);
// irclib.cpp
UINT_PTR DCCTimer;
- void SendIrcMessage( const TCHAR*, bool bNotify = true, int codepage = -1 );
+ void SendIrcMessage(const TCHAR*, bool bNotify = true, int codepage = -1);
// ircproto.cpp
- void __cdecl AckBasicSearch( void* param );
- void __cdecl AckMessageFail( void* info );
- void __cdecl AckMessageFailDcc( void* info );
- void __cdecl AckMessageSuccess( void* info );
+ void __cdecl AckBasicSearch(void* param);
+ void __cdecl AckMessageFail(void* info);
+ void __cdecl AckMessageFailDcc(void* info);
+ void __cdecl AckMessageSuccess(void* info);
- int SetStatusInternal( int iNewStatus, bool bIsInternal );
+ int SetStatusInternal(int iNewStatus, bool bIsInternal);
//options.cpp
HWND m_hwndConnect;
@@ -501,12 +501,12 @@ struct CIrcProto : public PROTO<CIrcProto>
////////////////////////////////////////////////////////////////////////////////////////
// former CIrcSession class
- void AddDCCSession(HANDLE hContact, CDccSession* dcc);
+ void AddDCCSession(HCONTACT hContact, CDccSession* dcc);
void AddDCCSession(DCCINFO* pdci, CDccSession* dcc);
- void RemoveDCCSession(HANDLE hContact);
+ void RemoveDCCSession(HCONTACT hContact);
void RemoveDCCSession(DCCINFO* pdci);
- CDccSession* FindDCCSession(HANDLE hContact);
+ CDccSession* FindDCCSession(HCONTACT hContact);
CDccSession* FindDCCSession(DCCINFO* pdci);
CDccSession* FindDCCSendByPort(int iPort);
CDccSession* FindDCCRecvByPortAndName(int iPort, const TCHAR* szName);
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp
index f1daa53f6a..b1e97a4212 100644
--- a/protocols/IRCG/src/irclib.cpp
+++ b/protocols/IRCG/src/irclib.cpp
@@ -457,7 +457,7 @@ void __cdecl CIrcProto::ThreadProc(void*)
m_info.Reset();
}
-void CIrcProto::AddDCCSession(HANDLE, CDccSession* dcc)
+void CIrcProto::AddDCCSession(HCONTACT, CDccSession* dcc)
{
EnterCriticalSection(&m_dcc);
@@ -479,7 +479,7 @@ void CIrcProto::AddDCCSession(DCCINFO*, CDccSession* dcc)
LeaveCriticalSection(&m_dcc);
}
-void CIrcProto::RemoveDCCSession(HANDLE hContact)
+void CIrcProto::RemoveDCCSession(HCONTACT hContact)
{
EnterCriticalSection(&m_dcc);
@@ -505,7 +505,7 @@ void CIrcProto::RemoveDCCSession(DCCINFO* pdci)
LeaveCriticalSection(&m_dcc);
}
-CDccSession* CIrcProto::FindDCCSession(HANDLE hContact)
+CDccSession* CIrcProto::FindDCCSession(HCONTACT hContact)
{
EnterCriticalSection(&m_dcc);
diff --git a/protocols/IRCG/src/irclib.h b/protocols/IRCG/src/irclib.h
index 7dcb5a4c01..d0efcd6fcf 100644
--- a/protocols/IRCG/src/irclib.h
+++ b/protocols/IRCG/src/irclib.h
@@ -35,20 +35,20 @@ namespace irc {
struct DCCINFO : public MZeroedObject
{
- DWORD dwAdr;
+ DWORD dwAdr;
unsigned __int64 dwSize;
- DWORD iType;
+ DWORD iType;
CMString sToken;
- int iPort;
- BOOL bTurbo;
- BOOL bSSL;
- BOOL bSender;
- BOOL bReverse;
+ int iPort;
+ BOOL bTurbo;
+ BOOL bSSL;
+ BOOL bSender;
+ BOOL bReverse;
CMString sPath;
CMString sFile;
CMString sFileAndPath;
CMString sHostmask;
- HANDLE hContact;
+ HCONTACT hContact;
CMString sContactName;
};
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index 06d2ae0397..e1a26116f4 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -327,7 +327,7 @@ HANDLE __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
id = psr->flags & PSR_UNICODE ? mir_u2t((wchar_t*)id) : mir_a2t((char*)id);
CONTACT user = { id, NULL, NULL, true, false, false };
- HANDLE hContact = CList_AddContact(&user, true, false);
+ HCONTACT hContact = CList_AddContact(&user, true, false);
if (hContact) {
DBVARIANT dbv1;
@@ -383,7 +383,7 @@ int __cdecl CIrcProto::AuthDeny(HANDLE, const TCHAR*)
////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CIrcProto::AuthRecv(HANDLE, PROTORECVEVENT*)
+int __cdecl CIrcProto::AuthRecv(HCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -391,7 +391,7 @@ int __cdecl CIrcProto::AuthRecv(HANDLE, PROTORECVEVENT*)
////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CIrcProto::AuthRequest(HANDLE, const TCHAR*)
+int __cdecl CIrcProto::AuthRequest(HCONTACT, const TCHAR*)
{
return 1;
}
@@ -407,7 +407,7 @@ HANDLE __cdecl CIrcProto::ChangeInfo(int, void*)
////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CIrcProto::FileAllow(HANDLE, HANDLE hTransfer, const TCHAR* szPath)
+HANDLE __cdecl CIrcProto::FileAllow(HCONTACT, HANDLE hTransfer, const TCHAR* szPath)
{
DCCINFO* di = (DCCINFO*)hTransfer;
@@ -428,7 +428,7 @@ HANDLE __cdecl CIrcProto::FileAllow(HANDLE, HANDLE hTransfer, const TCHAR* szPat
////////////////////////////////////////////////////////////////////////////////////////
// FileCancel - cancels a file transfer
-int __cdecl CIrcProto::FileCancel(HANDLE, HANDLE hTransfer)
+int __cdecl CIrcProto::FileCancel(HCONTACT, HANDLE hTransfer)
{
DCCINFO* di = (DCCINFO*)hTransfer;
@@ -444,7 +444,7 @@ int __cdecl CIrcProto::FileCancel(HANDLE, HANDLE hTransfer)
////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CIrcProto::FileDeny(HANDLE, HANDLE hTransfer, const TCHAR*)
+int __cdecl CIrcProto::FileDeny(HCONTACT, HANDLE hTransfer, const TCHAR*)
{
DCCINFO* di = (DCCINFO*)hTransfer;
delete di;
@@ -500,7 +500,7 @@ int __cdecl CIrcProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** s
////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CIrcProto::GetCaps(int type, HANDLE)
+DWORD_PTR __cdecl CIrcProto::GetCaps(int type, HCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -531,7 +531,7 @@ DWORD_PTR __cdecl CIrcProto::GetCaps(int type, HANDLE)
////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CIrcProto::GetInfo(HANDLE, int)
+int __cdecl CIrcProto::GetInfo(HCONTACT, int)
{
return 1;
}
@@ -599,7 +599,7 @@ HWND __cdecl CIrcProto::SearchAdvanced(HWND)
////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CIrcProto::RecvContacts(HANDLE, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvContacts(HCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -607,7 +607,7 @@ int __cdecl CIrcProto::RecvContacts(HANDLE, PROTORECVEVENT*)
////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CIrcProto::RecvFile(HANDLE hContact, PROTORECVFILET* evt)
+int __cdecl CIrcProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -615,7 +615,7 @@ int __cdecl CIrcProto::RecvFile(HANDLE hContact, PROTORECVFILET* evt)
////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CIrcProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* evt)
+int __cdecl CIrcProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
{
return Proto_RecvMessage(hContact, evt);
}
@@ -623,7 +623,7 @@ int __cdecl CIrcProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* evt)
////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CIrcProto::RecvUrl(HANDLE, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvUrl(HCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -631,7 +631,7 @@ int __cdecl CIrcProto::RecvUrl(HANDLE, PROTORECVEVENT*)
////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CIrcProto::SendContacts(HANDLE, int, int, HANDLE*)
+int __cdecl CIrcProto::SendContacts(HCONTACT, int, int, HCONTACT*)
{
return 1;
}
@@ -639,7 +639,7 @@ int __cdecl CIrcProto::SendContacts(HANDLE, int, int, HANDLE*)
////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CIrcProto::SendFile(HANDLE hContact, const TCHAR*, TCHAR** ppszFiles)
+HANDLE __cdecl CIrcProto::SendFile(HCONTACT hContact, const TCHAR*, TCHAR** ppszFiles)
{
DCCINFO* dci = NULL;
int iPort = 0;
@@ -780,22 +780,22 @@ HANDLE __cdecl CIrcProto::SendFile(HANDLE hContact, const TCHAR*, TCHAR** ppszFi
struct TFakeAckParam
{
- __inline TFakeAckParam(HANDLE _hContact, int _msgid) :
+ __inline TFakeAckParam(HCONTACT _hContact, int _msgid) :
hContact(_hContact), msgid(_msgid)
{}
- HANDLE hContact;
+ HCONTACT hContact;
int msgid;
};
void __cdecl CIrcProto::AckMessageFail(void *info)
{
- ProtoBroadcastAck(info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
+ ProtoBroadcastAck((HCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
}
void __cdecl CIrcProto::AckMessageFailDcc(void *info)
{
- ProtoBroadcastAck(info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
+ ProtoBroadcastAck((HCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
}
void __cdecl CIrcProto::AckMessageSuccess(void *info)
@@ -805,7 +805,7 @@ void __cdecl CIrcProto::AckMessageSuccess(void *info)
delete param;
}
-int __cdecl CIrcProto::SendMsg(HANDLE hContact, int flags, const char* pszSrc)
+int __cdecl CIrcProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
{
BYTE bDcc = getByte(hContact, "DCC", 0);
WORD wStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -846,7 +846,7 @@ int __cdecl CIrcProto::SendMsg(HANDLE hContact, int flags, const char* pszSrc)
////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CIrcProto::SendUrl(HANDLE, int, const char*)
+int __cdecl CIrcProto::SendUrl(HCONTACT, int, const char*)
{
return 1;
}
@@ -854,7 +854,7 @@ int __cdecl CIrcProto::SendUrl(HANDLE, int, const char*)
////////////////////////////////////////////////////////////////////////////////////////
// SetApparentMode - sets the visibility status
-int __cdecl CIrcProto::SetApparentMode(HANDLE, int)
+int __cdecl CIrcProto::SetApparentMode(HCONTACT, int)
{
return 0;
}
@@ -936,7 +936,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal)
////////////////////////////////////////////////////////////////////////////////////////
// GetAwayMsg - returns a contact's away message
-HANDLE __cdecl CIrcProto::GetAwayMsg(HANDLE hContact)
+HANDLE __cdecl CIrcProto::GetAwayMsg(HCONTACT hContact)
{
WhoisAwayReply = _T("");
DBVARIANT dbv;
@@ -963,7 +963,7 @@ HANDLE __cdecl CIrcProto::GetAwayMsg(HANDLE hContact)
////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CIrcProto::RecvAwayMsg(HANDLE, int, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvAwayMsg(HCONTACT, int, PROTORECVEVENT*)
{
return 1;
}
@@ -998,7 +998,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg)
/////////////////////////////////////////////////////////////////////////////////////////
// UserIsTyping - sends a UTN notification
-int __cdecl CIrcProto::UserIsTyping(HANDLE, int)
+int __cdecl CIrcProto::UserIsTyping(HCONTACT, int)
{
return 0;
}
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp
index e472e2259f..84dfcc8203 100644
--- a/protocols/IRCG/src/scripting.cpp
+++ b/protocols/IRCG/src/scripting.cpp
@@ -188,7 +188,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam)
else if (sRequest == "usercount" && !sChannel.IsEmpty()) {
CMString S = MakeWndID(sChannel.c_str());
GC_INFO gci = { 0 };
- gci.Flags = BYID | COUNT;
+ gci.Flags = GCF_BYID | GCF_COUNT;
gci.pszModule = m_szModuleName;
gci.pszID = S.c_str();
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
@@ -200,7 +200,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam)
else if (sRequest == "userlist" && !sChannel.IsEmpty()) {
CMString S = MakeWndID(sChannel.c_str());
GC_INFO gci = { 0 };
- gci.Flags = BYID | USERS;
+ gci.Flags = GCF_BYID | GCF_USERS;
gci.pszModule = m_szModuleName;
gci.pszID = S.c_str();
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
@@ -213,7 +213,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam)
int j = 0;
while (j < i) {
GC_INFO gci = { 0 };
- gci.Flags = BYINDEX | ID;
+ gci.Flags = GCF_BYINDEX | GCF_ID;
gci.pszModule = m_szModuleName;
gci.iItem = j;
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 2fe0fd2c81..8e82c02da0 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -90,7 +90,7 @@ void CIrcProto::InitMainMenus(void)
static HGENMENU hUMenuChanSettings, hUMenuWhois, hUMenuDisconnect, hUMenuIgnore;
static HANDLE hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
-static CIrcProto* IrcGetInstanceByHContact(HANDLE hContact)
+static CIrcProto* IrcGetInstanceByHContact(HCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -105,25 +105,25 @@ static CIrcProto* IrcGetInstanceByHContact(HANDLE hContact)
static INT_PTR IrcMenuChanSettings(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HANDLE)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnMenuChanSettings(wParam, lParam) : 0;
}
static INT_PTR IrcMenuWhois(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HANDLE)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnMenuWhois(wParam, lParam) : 0;
}
static INT_PTR IrcMenuDisconnect(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HANDLE)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnMenuDisconnect(wParam, lParam) : 0;
}
static INT_PTR IrcMenuIgnore(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HANDLE)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnMenuIgnore(wParam, lParam) : 0;
}
@@ -134,7 +134,7 @@ int IrcPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
Menu_ShowItem(hUMenuDisconnect, false);
Menu_ShowItem(hUMenuIgnore, false);
- CIrcProto *ppro = IrcGetInstanceByHContact((HANDLE)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnMenuPreBuild(wParam, lParam) : 0;
}
@@ -196,7 +196,7 @@ INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam)
CLISTEVENT* pcle = (CLISTEVENT*)lParam;
- if (getByte((HANDLE)pcle->hContact, "DCC", 0) != 0) {
+ if (getByte(pcle->hContact, "DCC", 0) != 0) {
DCCINFO* pdci = (DCCINFO*)pcle->lParam;
CMessageBoxDlg* dlg = new CMessageBoxDlg(this, pdci);
dlg->Show();
@@ -213,7 +213,7 @@ INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam)
int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM)
{
- HANDLE hContact = (HANDLE)wp;
+ HCONTACT hContact = (HCONTACT)wp;
if (!hContact)
return 0;
@@ -233,9 +233,9 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM)
PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
}
else {
- BYTE bDCC = getByte((HANDLE)wp, "DCC", 0);
+ BYTE bDCC = getByte((HCONTACT)wp, "DCC", 0);
if (bDCC) {
- CDccSession* dcc = FindDCCSession((HANDLE)wp);
+ CDccSession* dcc = FindDCCSession((HCONTACT)wp);
if (dcc)
dcc->Disconnect();
}
@@ -252,8 +252,8 @@ INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM)
return 0;
DBVARIANT dbv;
- if (!getTString((HANDLE)wp, "Nick", &dbv)) {
- if (getByte((HANDLE)wp, "ChatRoom", 0) == GCW_CHATROOM)
+ if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
+ if (getByte((HCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM)
PostIrcMessage(_T("/JOIN %s"), dbv.ptszVal);
db_free(&dbv);
}
@@ -266,8 +266,8 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM)
return 0;
DBVARIANT dbv;
- if (!getTString((HANDLE)wp, "Nick", &dbv)) {
- if (getByte((HANDLE)wp, "ChatRoom", 0) == GCW_CHATROOM) {
+ if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
+ if (getByte((HCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) {
PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
CMString S = MakeWndID(dbv.ptszVal);
@@ -285,7 +285,7 @@ INT_PTR __cdecl CIrcProto::OnMenuChanSettings(WPARAM wp, LPARAM)
if (!wp)
return 0;
- HANDLE hContact = (HANDLE)wp;
+ HCONTACT hContact = (HCONTACT)wp;
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
PostIrcMessageWnd(dbv.ptszVal, NULL, _T("/CHANNELMANAGER"));
@@ -301,7 +301,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM)
DBVARIANT dbv;
- if (!getTString((HANDLE)wp, "Nick", &dbv)) {
+ if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
PostIrcMessage(_T("/WHOIS %s %s"), dbv.ptszVal, dbv.ptszVal);
db_free(&dbv);
}
@@ -310,7 +310,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM)
INT_PTR __cdecl CIrcProto::OnMenuDisconnect(WPARAM wp, LPARAM)
{
- CDccSession* dcc = FindDCCSession((HANDLE)wp);
+ CDccSession* dcc = FindDCCSession((HCONTACT)wp);
if (dcc)
dcc->Disconnect();
return 0;
@@ -321,7 +321,7 @@ INT_PTR __cdecl CIrcProto::OnMenuIgnore(WPARAM wp, LPARAM)
if (!wp)
return 0;
- HANDLE hContact = (HANDLE)wp;
+ HCONTACT hContact = (HCONTACT)wp;
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
if (!isChatRoom(hContact)) {
@@ -865,7 +865,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam)
if (gcmi->Type == MENU_ON_NICKLIST) {
CONTACT user = { (TCHAR*)gcmi->pszUID, NULL, NULL, false, false, false };
- HANDLE hContact = CList_FindContact(&user);
+ HCONTACT hContact = CList_FindContact(&user);
gcmi->nItems = SIZEOF(nickItems);
gcmi->Item = nickItems;
@@ -934,7 +934,7 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM)
int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -978,7 +978,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL || !IsConnected())
return 0;
diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp
index 2e6943b123..a62a7fbc5d 100644
--- a/protocols/IRCG/src/ui_utils.cpp
+++ b/protocols/IRCG/src/ui_utils.cpp
@@ -629,7 +629,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh)
return FALSE;
}
-void CCtrlClc::AddContact(HANDLE hContact)
+void CCtrlClc::AddContact(HCONTACT hContact)
{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
}
@@ -661,7 +661,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags)
{ SendMessage(m_hwnd, CLM_EXPAND, (WPARAM)hItem, flags);
}
-HANDLE CCtrlClc::FindContact(HANDLE hContact)
+HANDLE CCtrlClc::FindContact(HCONTACT hContact)
{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
}
diff --git a/protocols/IRCG/src/ui_utils.h b/protocols/IRCG/src/ui_utils.h
index b5fe9dadb4..c42ea6a668 100644
--- a/protocols/IRCG/src/ui_utils.h
+++ b/protocols/IRCG/src/ui_utils.h
@@ -409,7 +409,7 @@ class CCtrlClc: public CCtrlBase
public:
CCtrlClc( CDlgBase* dlg, int ctrlId );
- void AddContact(HANDLE hContact);
+ void AddContact(HCONTACT hContact);
void AddGroup(HANDLE hGroup);
void AutoRebuild();
void DeleteItem(HANDLE hItem);
@@ -417,7 +417,7 @@ public:
void EndEditLabel(bool save);
void EnsureVisible(HANDLE hItem, bool partialOk);
void Expand(HANDLE hItem, DWORD flags);
- HANDLE FindContact(HANDLE hContact);
+ HANDLE FindContact(HCONTACT hContact);
HANDLE FindGroup(HANDLE hGroup);
COLORREF GetBkColor();
bool GetCheck(HANDLE hItem);
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp
index 7ed1fc12a0..dc4a5c8b14 100644
--- a/protocols/IRCG/src/userinfo.cpp
+++ b/protocols/IRCG/src/userinfo.cpp
@@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct UserDetailsDlgProcParam
{
- UserDetailsDlgProcParam( CIrcProto* _pro, HANDLE _info ) :
- ppro( _pro ),
- hContact( _info )
+ UserDetailsDlgProcParam(CIrcProto* _pro, HCONTACT _info) :
+ ppro(_pro),
+ hContact(_info)
{}
CIrcProto *ppro;
- HANDLE hContact;
+ HCONTACT hContact;
};
#define STR_BASIC LPGEN("Faster! Searches the network for an exact match of the nickname only. The hostmask is optional and provides further security if used. Wildcards (? and *) are allowed.")
@@ -45,7 +45,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM
UserDetailsDlgProcParam *p = (UserDetailsDlgProcParam*)GetWindowLongPtr(m_hwnd, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- p = new UserDetailsDlgProcParam(NULL, (HANDLE)lParam);
+ p = new UserDetailsDlgProcParam(NULL, (HCONTACT)lParam);
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LPARAM)p);
break;
@@ -188,7 +188,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM
int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)lParam;
char *szProto = GetContactProto(hContact);
if (!hContact || !szProto || lstrcmpiA(szProto, m_szModuleName))
return 0;