summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
commit75b1ff75c42644eb36552762652e4b0c9ff071bc (patch)
tree238f026ef373d30a395846f38c302a81961b14ac /plugins/!NotAdopted
parent2caba72d51b09368801f23dd8951d589ab4dc809 (diff)
final switch to the typed icolib api
git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted')
-rw-r--r--plugins/!NotAdopted/NoHistory/icons.cpp8
-rw-r--r--plugins/!NotAdopted/NotesAndReminders/src/notes.cpp46
-rw-r--r--plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp102
-rw-r--r--plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp2
-rw-r--r--plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp89
-rw-r--r--plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp4
-rw-r--r--plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h2
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h2
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/main.cpp222
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/options.cpp8
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/tools.cpp52
11 files changed, 251 insertions, 286 deletions
diff --git a/plugins/!NotAdopted/NoHistory/icons.cpp b/plugins/!NotAdopted/NoHistory/icons.cpp
index 741ad3727e..b8fcddc70b 100644
--- a/plugins/!NotAdopted/NoHistory/icons.cpp
+++ b/plugins/!NotAdopted/NoHistory/icons.cpp
@@ -6,9 +6,9 @@ HICON hIconRemove, hIconKeep, hIconClear;
HANDLE hIcoLibIconsChanged = 0;
int ReloadIcons(WPARAM wParam, LPARAM lParam) {
- hIconRemove = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_remove");
- hIconKeep = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_keep");
- hIconClear = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_clear");
+ hIconRemove = Skin_GetIcon(MODULE "_remove");
+ hIconKeep = Skin_GetIcon(MODULE "_keep");
+ hIconClear = Skin_GetIcon(MODULE "_clear");
return 0;
}
@@ -26,7 +26,7 @@ void InitIcons() {
sid.pszDefaultFile = MODULE ".dll"; \
sid.hDefaultIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(z), IMAGE_ICON, 0, 0, 0); \
CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); \
- sid.iDefaultIndex++;
+ sid.iDefaultIndex++;
AddIcon("Disable", MODULE "_remove", IDI_HREMOVE);
AddIcon("Enable", MODULE "_keep", IDI_HKEEP);
diff --git a/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp b/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp
index 5f98768d8b..67bc7c3439 100644
--- a/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp
+++ b/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp
@@ -248,7 +248,7 @@ STICKYNOTE* NewNoteEx(int Ax,int Ay,int Aw,int Ah,char *Data,ULARGE_INTEGER *ID,
TWC.lpszClassName = NOTE_WND_CLASS;
TWC.cbSize = sizeof(WNDCLASSEX);
TWC.lpfnWndProc = (WNDPROC)StickyNoteWndProc;
- if (!RegisterClassEx(&TWC)) return NULL;
+ if (!RegisterClassEx(&TWC)) return NULL;
}
if (!TData || Aw < 0 || Ah < 0)
@@ -276,12 +276,12 @@ STICKYNOTE* NewNoteEx(int Ax,int Ay,int Aw,int Ah,char *Data,ULARGE_INTEGER *ID,
TreeAdd(&g_Stickies,TSN);
- if (!TData)
+ if (!TData)
{
TData = _strdup("");
TSN->data = TData;
}
- else
+ else
TSN->data = TData;
// init note title (time-stamp)
@@ -552,7 +552,7 @@ void LoadNotes(BOOL bIsStartup)
ULARGE_INTEGER newid;
OT = 1; TV = 1;
- Tx = 100; Ty = 100;
+ Tx = 100; Ty = 100;
Tw = 179; Th = 35;
Data = NULL; ID = NULL;
@@ -869,7 +869,7 @@ static void JustSaveNotesEx(STICKYNOTE *pModified)
bDeleteTData = FALSE;
}
- if (!tData)
+ if (!tData)
// empty note
SzT = 0;
else
@@ -1192,7 +1192,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara
{
switch (message)
{
- case WM_CLOSE:
+ case WM_CLOSE:
return TRUE;
case WM_SIZE:
@@ -1330,7 +1330,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara
HICON hcIcon;
if (SN->OnTop)
hcIcon = Skin_GetIconByHandle(hIconLibItem[4]);
- else
+ else
hcIcon = Skin_GetIconByHandle(hIconLibItem[7]);
DrawIcon(hdc, wr.right - wr.left - 16, 0 + 3, hcIcon);
Skin_ReleaseIcon(hcIcon);
@@ -1366,17 +1366,17 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara
RedrawWindow(hdlg, NULL, NULL, RDW_UPDATENOW);
return TRUE;
case WM_NOTIFY:
- if (LOWORD(wParam) == 1)
+ if (LOWORD(wParam) == 1)
{
char *Buff;
PENLINK PEnLnk = (PENLINK)lParam;
- if (PEnLnk->msg == WM_LBUTTONDOWN)
+ if (PEnLnk->msg == WM_LBUTTONDOWN)
{
SendDlgItemMessage(hdlg,1,EM_EXSETSEL,0,(LPARAM)&(PEnLnk->chrg));
Buff = (char*)malloc(PEnLnk->chrg.cpMax - PEnLnk->chrg.cpMin + 1);
SendDlgItemMessage(hdlg,1,EM_GETSELTEXT,0,(LPARAM)Buff);
- if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0)
+ if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0)
ShellExecute(hdlg,"open","iexplore",Buff,"",SW_SHOWNORMAL);
else if (g_lpszAltBrowser && *g_lpszAltBrowser)
ShellExecute(hdlg,"open",g_lpszAltBrowser,Buff,"",SW_SHOWNORMAL);
@@ -1712,7 +1712,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara
RemoveProp(hdlg, "ctrldata");
}
break;
- case WM_CONTEXTMENU:
+ case WM_CONTEXTMENU:
if (DoContextMenu(hdlg,wParam,lParam)) return FALSE;
default:
@@ -1941,7 +1941,7 @@ int CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lPar
InitListView(GetDlgItem(Dialog,IDC_LISTREMINDERS));
return TRUE;
}
- case WM_CONTEXTMENU:
+ case WM_CONTEXTMENU:
{
HWND H;
STICKYNOTE *pNote = NULL;
@@ -2023,24 +2023,24 @@ int CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lPar
return TRUE;
}
case WM_CLOSE:
- {
- DestroyWindow(Dialog);
- ListNotesVisible = FALSE;
- return TRUE;
- }
+ DestroyWindow(Dialog);
+ ListNotesVisible = FALSE;
+ return TRUE;
+
case WM_DESTROY:
- ListNotesVisible = FALSE;
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
- return TRUE;
+ ListNotesVisible = FALSE;
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_SMALL, 0));
+ return TRUE;
+
case WM_NOTIFY:
{
if (wParam == IDC_LISTREMINDERS)
{
NM = (NMLISTVIEW *)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
- case LVN_ITEMCHANGED:
+ case LVN_ITEMCHANGED:
{
S = ((STICKYNOTE*)TreeGetAt(g_Stickies,NM->iItem))->data;
SetDlgItemText(Dialog,IDC_REMINDERDATA,S);
diff --git a/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp b/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp
index 0d545056f9..2b3eb77f3b 100644
--- a/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp
+++ b/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp
@@ -404,7 +404,7 @@ void JustSaveReminders(void)
else
tmpReminder = NULL;
- if (!tmpReminder)
+ if (!tmpReminder)
tmpReminder = "";
Value = (char*)malloc(strlen(tmpReminder) + 512);
@@ -689,7 +689,7 @@ void ExportReminders()
void NewReminder(void)
{
- if (!NewReminderVisible)
+ if (!NewReminderVisible)
{
NewReminderVisible = TRUE;
CreateDialog(hinstance, MAKEINTRESOURCE(IDD_ADDREMINDER), 0, DlgProcNewReminder);
@@ -1302,7 +1302,7 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
// item data contains time offset from midnight in seconds (bit 31 is set to flag that
// combo box items are absolute times and not relative times like below
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((ULONG)((h*60+m)*60) | 0x80000000));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((ULONG)((h*60+m)*60) | 0x80000000));
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
@@ -1331,35 +1331,35 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S
wCurMinute = tm2.wMinute;
mir_snprintf(s, sizeof(s), "%02d:%02d", (UINT)tm2.wHour, (UINT)tm2.wMinute);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 5 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (5 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 10 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (10 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 15 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (15 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 30 minutes
li.QuadPart += (ULONGLONG)15 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (30 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// round +1h time to nearest even or half hour
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
@@ -1393,7 +1393,7 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S
else
mir_snprintf(s, sizeof(s), "%02d:%02d (%d.%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, dt/60, ((dt%60)*10)/60, lpszHours);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(dt*60));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)(dt*60));
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
}
@@ -1424,39 +1424,39 @@ static void PopulateTimeOffsetCombo(HWND Dialog, UINT nIDCombo)
{
mir_snprintf(s, sizeof(s), "%d %s", i*5, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*5));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*5));
}
// 1 hour
mir_snprintf(s, sizeof(s), "1 %s", lpszHour);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)60);
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)60);
// 2, 4, 8 hours
for (i = 2; i <= 8; i+=2)
{
mir_snprintf(s, sizeof(s), "%d %s", i, lpszHours);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*60));
}
// 1 day
mir_snprintf(s, sizeof(s), "1 %s", lpszDay);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(24*60));
// 2-4 days
for (i = 2; i <= 4; i++)
{
mir_snprintf(s, sizeof(s), "%d %s", i, lpszDays);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*24*60));
}
// 1 week
mir_snprintf(s, sizeof(s), "1 %s", lpszWeek);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(7*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(7*24*60));
}
// returns non-zero if specified time was inside "missing" hour of daylight saving
@@ -1508,7 +1508,7 @@ static int ReformatTimeInputEx(HWND Dialog, UINT nIDTime, UINT nIDRefTime, int h
n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
return 0;
}
@@ -1531,7 +1531,7 @@ static int ReformatTimeInputEx(HWND Dialog, UINT nIDTime, UINT nIDRefTime, int h
n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
return 0;
}
@@ -1638,7 +1638,7 @@ output_result:
n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
goto invalid_dst;
}
@@ -1681,7 +1681,7 @@ preset_value:;
{
// time offset from ref time ("24:43 (5 Minutes)" etc.)
- UINT nDeltaSeconds = (UINT)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, (WPARAM)n, 0);
+ UINT nDeltaSeconds = (UINT)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, n, 0);
li.QuadPart += (ULONGLONG)nDeltaSeconds * FILETIME_TICKS_PER_SEC;
FILETIMEtoSYSTEMTIME((FILETIME*)&li, pDate);
@@ -1698,7 +1698,7 @@ preset_value:;
{
// absolute time (offset from midnight on pDate)
- UINT nDeltaSeconds = (UINT)((ULONG)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, (WPARAM)n, 0) & ~0x80000000);
+ UINT nDeltaSeconds = (UINT)((ULONG)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, n, 0) & ~0x80000000);
pDate->wHour = 0;
pDate->wMinute = 0;
pDate->wSecond = 0;
@@ -1853,7 +1853,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM
{
NMLISTVIEW *NM = (NMLISTVIEW*)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
case DTN_DATETIMECHANGE:
OnDateChanged(Dialog, IDC_DATEAGAIN, IDC_TIMEAGAIN, IDC_REFTIME);
@@ -2005,7 +2005,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM
n = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETCURSEL,0,0);
if (n != CB_ERR)
{
- TT = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETITEMDATA,(WPARAM)n,0) * 60;
+ TT = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETITEMDATA,n, 0) * 60;
if (TT >= 24*3600)
{
@@ -2114,7 +2114,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM
}
SetFocus(NewNote(0, 0, -1, -1, ReminderText, 0, TRUE, TRUE, 0)->REHwnd);
- break;
+ break;
}
}
return TRUE;
@@ -2186,7 +2186,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
// search for preset first
n = SendDlgItemMessage(Dialog, IDC_TIME, CB_FINDSTRING, (WPARAM)-1, (LPARAM)s);
if (n != CB_ERR)
- SendDlgItemMessage(Dialog, IDC_TIME, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, IDC_TIME, CB_SETCURSEL, n, 0);
else
SetDlgItemText(Dialog, IDC_TIME, s);
@@ -2207,31 +2207,31 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
// NOTE: use multiples of REMINDER_UPDATE_INTERVAL_SHORT (currently 5 seconds)
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)Translate("Never"));
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)0);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA, n, 0);
mir_snprintf(s, sizeof(s), "%s 5 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)5);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)5);
mir_snprintf(s, sizeof(s), "%s 10 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)10);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)10);
mir_snprintf(s, sizeof(s), "%s 15 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)15);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)15);
mir_snprintf(s, sizeof(s), "%s 20 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)20);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)20);
mir_snprintf(s, sizeof(s), "%s 30 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)30);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)30);
mir_snprintf(s, sizeof(s), "%s 60 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)60);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)60);
if (NewReminderVisible == 2 && pEditReminder->RepeatSound)
{
@@ -2248,13 +2248,13 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
// populate sound selection combo
{
int n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Default"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)0);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, 0);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Alternative 1"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)1);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)1);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Alternative 2"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)2);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)2);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("None"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)-1);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)-1);
if (NewReminderVisible == 2 && pEditReminder->SoundSel)
{
@@ -2303,9 +2303,9 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
{
NMLISTVIEW *NM = (NMLISTVIEW*)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
- case DTN_DATETIMECHANGE:
+ case DTN_DATETIMECHANGE:
OnDateChanged(Dialog, IDC_DATE, IDC_TIME, IDC_REFTIME);
break;
}
@@ -2347,7 +2347,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
case CBN_SELENDOK:
{
int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETCURSEL, 0, 0);
- n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, (WPARAM)n, 0);
+ n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, n, 0);
EnableWindow(GetDlgItem(Dialog, IDC_BTN_PLAYSOUND), n>=0);
EnableWindow(GetDlgItem(Dialog, IDC_COMBO_REPEATSND), n>=0);
@@ -2359,7 +2359,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
case IDC_BTN_PLAYSOUND:
{
int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETCURSEL, 0, 0);
- n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, (WPARAM)n, 0);
+ n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, n, 0);
switch (n)
{
case 0: SkinPlaySound("AlertReminder"); break;
@@ -2377,7 +2377,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP
DestroyWindow(Dialog);
NewReminderVisible = FALSE;
pEditReminder = NULL;
- return TRUE;
+ return TRUE;
}
case IDC_VIEWREMINDERS:
{
@@ -2712,7 +2712,7 @@ int CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPARAM
NM = (NMLISTVIEW *)lParam;
switch (NM->hdr.code)
{
- case LVN_ITEMCHANGED:
+ case LVN_ITEMCHANGED:
{
S = ((REMINDERDATA*)TreeGetAt(RemindersList,NM->iItem))->Reminder;
SetDlgItemText(Dialog,IDC_REMINDERDATA,S);
@@ -2808,11 +2808,9 @@ int CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPARAM
}
}
case WM_DESTROY:
- {
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
- break;
- }
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_SMALL, 0));
+ break;
}
return FALSE;
}
@@ -2848,12 +2846,12 @@ unsigned long WS_ResolveName(char *name,WORD *port,int defaultPort)
nameCopy=_strdup(name);
if(port != NULL) *port = defaultPort;
pcolon = strchr(nameCopy,':');
- if(pcolon != NULL)
+ if(pcolon != NULL)
{
if(port != NULL) *port = atoi(pcolon+1);
*pcolon = 0;
}
- if (inet_addr(nameCopy) == INADDR_NONE)
+ if (inet_addr(nameCopy) == INADDR_NONE)
{
lk = gethostbyname(nameCopy);
if(lk == 0) return SOCKET_ERROR;
@@ -2878,11 +2876,11 @@ void Send(char *user, char *host, char *Msg, char *server)
if(connect(S,(SOCKADDR*)&sockaddr,sizeof(sockaddr)) == SOCKET_ERROR) return;
ch = (char*)malloc(strlen(user) + strlen(host) + 16);
ch = (char*)realloc(ch,sprintf(ch,"rcpt to:%s@%s\r\n",user,host));
- WS_Send(S,"mail from: \r\n",13);
+ WS_Send(S,"mail from: \r\n",13);
WS_Send(S,ch,strlen(ch));
- WS_Send(S,"data\r\n",6);
- WS_Send(S,"From:<REM>\r\n\r\n",14);
- WS_Send(S,Msg,strlen(Msg));
+ WS_Send(S,"data\r\n",6);
+ WS_Send(S,"From:<REM>\r\n\r\n",14);
+ WS_Send(S,Msg,strlen(Msg));
WS_Send(S,"\r\n.\r\n",5);
WS_Send(S,"quit\r\n",6);
SAFE_FREE((void**)&ch);
diff --git a/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp b/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp
index e37ce72ce9..570f22d023 100644
--- a/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp
+++ b/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp
@@ -75,7 +75,7 @@ BOOL CALLBACK DlgProcAutoAwayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
tci.lParam = (LPARAM)theDialogAA;
tci.pszText = TranslateT("Statuses");
GetClientRect(theDialogAA,&rcClient);
- SendMessage(GetDlgItem(hwndDlg, IDC_OPT_SAA_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_OPT_SAA_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
MoveWindow((HWND)theDialogAA,theTabSpace.left+(theTabSpace.right-rcClient.right)/2,
theTabSpace.top+(theTabSpace.bottom-rcClient.bottom)/2,
rcClient.right,rcClient.bottom,1);
diff --git a/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp b/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp
index bc5ad2a255..367bd93a77 100644
--- a/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp
+++ b/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp
@@ -2,8 +2,8 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2006 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -59,38 +59,37 @@ static int IconLibIconsChanged(WPARAM wParam, LPARAM lParam)
int i;
for (i=0;i<4;i++)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IdleServices[i]);
+ HICON hIcon = Skin_GetIcon(IdleServices[i]);
CListSetMenuItemIcon(hIdleMenu[i], hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)IdleServices[i]);
+ Skin_ReleaseIcon(IdleServices[i]);
}
return 0;
}
-void AddIdleMenu(){
+void AddIdleMenu(){
CLISTMENUITEM mi;
int i;
- if (ServiceExists(MS_SKIN2_GETICON)){
- SKINICONDESC sid = {0};
- hHookIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IconLibIconsChanged);
- hasIcoLib = 1;
- sid.cbSize = SKINICONDESC_SIZE_V2;
- sid.pszSection = SECTIONNAME;
- sid.pszDefaultFile = NULL;
- sid.iDefaultIndex = 0;
- for (i=0;i<4;i++){
- sid.pszDescription = iconDescs[i];
- sid.pszName = IdleServices[i];
- sid.iDefaultIndex = iconInd[i];
- sid.hDefaultIcon = (HICON)LoadImage(
- #ifdef SAA_PLUGIN
- g_hInst,
- #else
- GetModuleHandle(NULL),
- #endif
- MAKEINTRESOURCE( iconInd[i] ), IMAGE_ICON, 0, 0, 0);
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- DestroyIcon(sid.hDefaultIcon);
- }
+
+ SKINICONDESC sid = {0};
+ hHookIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IconLibIconsChanged);
+ hasIcoLib = 1;
+ sid.cbSize = SKINICONDESC_SIZE_V2;
+ sid.pszSection = SECTIONNAME;
+ sid.pszDefaultFile = NULL;
+ sid.iDefaultIndex = 0;
+ for (i=0;i<4;i++){
+ sid.pszDescription = iconDescs[i];
+ sid.pszName = IdleServices[i];
+ sid.iDefaultIndex = iconInd[i];
+ sid.hDefaultIcon = (HICON)LoadImage(
+ #ifdef SAA_PLUGIN
+ g_hInst,
+ #else
+ GetModuleHandle(NULL),
+ #endif
+ MAKEINTRESOURCE( iconInd[i] ), IMAGE_ICON, 0, 0, 0);
+ Skin_AddIcon(&sid);
+ DestroyIcon(sid.hDefaultIcon);
}
ZeroMemory(&mi,sizeof(mi));
@@ -99,41 +98,27 @@ void AddIdleMenu(){
mi.popupPosition=1000090000;
for (i=0;i<4;i++)
{
- if (hasIcoLib)
- mi.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IdleServices[i]);
- else
- mi.hIcon = (HICON)LoadImage(
- #ifdef SAA_PLUGIN
- g_hInst,
- #else
- GetModuleHandle(NULL),
- #endif
- MAKEINTRESOURCE(iconInd[i]), IMAGE_ICON, 0, 0, 0);
-
- mi.position=i+1;
- mi.pszName=iconDescs[i];
- mi.pszService=IdleServices[i];
- if (i==3) mi.position=1000000;
- hIdleMenu[i]=(HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
-
- if (hasIcoLib)
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)IdleServices[i]);
- else
- DestroyIcon(mi.hIcon);
+ mi.hIcon = Skin_GetIcon(IdleServices[i]);
+ mi.position = i+1;
+ mi.pszName = iconDescs[i];
+ mi.pszService = IdleServices[i];
+ if (i==3) mi.position = 1000000;
+ hIdleMenu[i] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+
+ Skin_ReleaseIcon(IdleServices[i]);
}
-// return 0;
}
MIRANDASERVICE idleServiceNotIdle(WPARAM w, LPARAM l){
- SimulateIdle(0);
+ SimulateIdle(0);
return 0;
};
MIRANDASERVICE idleServiceShortIdle(WPARAM w, LPARAM l){
- SimulateIdle(1);
+ SimulateIdle(1);
return 0;
};
MIRANDASERVICE idleServiceLongIdle(WPARAM w, LPARAM l){
- SimulateIdle(2);
+ SimulateIdle(2);
return 0;
};
MIRANDASERVICE reconnectService(WPARAM w, LPARAM l){
diff --git a/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp b/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp
index d83f82c51d..b0522406e9 100644
--- a/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp
+++ b/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp
@@ -110,7 +110,7 @@ int CSarLuaScript::SendMessage(CLuaBridge & luaBridge)
int CSarLuaScript::GetMyStatus(CLuaBridge & luaBridge)
{
lua_State *pFunctionContext = (lua_State*)luaBridge;
- int nStatusMode = CallService(MS_CLIST_GETSTATUSMODE, (WPARAM)0, (LPARAM)0);
+ int nStatusMode = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
nStatusMode = g_nCurrentMode;
@@ -217,7 +217,7 @@ int CSarLuaScript::SetMyStatus(CLuaBridge & luaBridge)
nNewStatus = ID_STATUS_OUTTOLUNCH;
}
- CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)nNewStatus, (LPARAM)0);
+ CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)nNewStatus, 0);
return FALSE;
}
diff --git a/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h b/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h
index 00df403181..616be6aac4 100644
--- a/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h
+++ b/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h
@@ -7000,7 +7000,7 @@ public:
int GetRangeLimit(BOOL bLowLimit) const
{
ATLASSERT(::IsWindow(m_hWnd));
- return (int)::SendMessage(m_hWnd, PBM_GETRANGE, bLowLimit, (LPARAM)NULL);
+ return (int)::SendMessage(m_hWnd, PBM_GETRANGE, bLowLimit, 0);
}
DWORD SetRange32(int nMin, int nMax)
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h b/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h
index f12ff96172..feae6e69de 100644
--- a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h
+++ b/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h
@@ -248,7 +248,7 @@ typedef struct {
//
// Add a icon into options UI
//
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(SKINICONDESC*)sid;
//
#define MS_SKIN2_ADDICON "Skin2/Icons/AddIcon"
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp b/plugins/!NotAdopted/Xfire/xfiretest/main.cpp
index f90eedce0b..1c590e0107 100644
--- a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp
+++ b/plugins/!NotAdopted/Xfire/xfiretest/main.cpp
@@ -3,7 +3,7 @@
//#define MIRANDA_VER 0x801
/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
+ * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
*
* Copyright (C) 2010 by
* dufte <dufte@justmail.de>
@@ -25,7 +25,7 @@
* Based on J. Lawler - BaseProtocol
* Herbert Poul/Beat Wolf - xfirelib
*
- * Miranda ICQ: the free icq client for MS Windows
+ * Miranda ICQ: the free icq client for MS Windows
* Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
*
*/
@@ -54,7 +54,7 @@
#include "inviterequestpacket.h"
#include "buddylistgames2packet.h"
#include "dummyxfiregameresolver.h"
-#include "sendtypingpacket.h"
+#include "sendtypingpacket.h"
#include "xfireclanpacket.h"
#include "recvremovebuddypacket.h"
#include "gameinfopacket.h"
@@ -298,7 +298,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
}
- XFireClient::XFireClient(string username_,string password_,char protover,int useproxy,string proxyip,int proxyport)
+ XFireClient::XFireClient(string username_,string password_,char protover,int useproxy,string proxyip,int proxyport)
: username(username_), password(password_) {
client = new Client();
client->setGameResolver( new DummyXFireGameResolver() );
@@ -343,7 +343,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
*(temp+100)=0;
}
SendStatusMessagePacket *packet = new SendStatusMessagePacket();
-
+
if(myClient->useutf8)
packet->awaymsg = s.c_str();
else
@@ -409,7 +409,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
psr.lastName = (char*)fb->lname->at(i).c_str();
ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
}
-
+
ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
break;
}
@@ -425,7 +425,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
if(entry)
ProcessBuddyInfo(buddyinfo,entry->hcontact,(char*)entry->username.c_str());
-
+
break;
}
case XFIRE_CLANINVITATION_ID:
@@ -453,7 +453,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
}
}
break;
- }
+ }
case XFIRE_RECVREMOVEBUDDYPACKET:
{
RecvRemoveBuddyPacket *remove = (RecvRemoveBuddyPacket*)content;
@@ -470,7 +470,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
{
if(myClient->client->connected)
{
- //
+ //
if (bpStatus == ID_STATUS_AWAY)
myClient->Status(statusmessage[1]);
else
@@ -496,7 +496,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
char temp[255];
char * dummy;
- ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
+ ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
sprintf(temp,"Clan_%d",clan->clanid);
DBVARIANT dbv;
@@ -560,7 +560,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
//handlingBuddys(entry,0,NULL);
}
break;
- }*/
+ }*/
case XFIRE_BUDDYS_GAMES_ID:
{
vector<char *> *sids=NULL; //dieses array dient zu zwischensicherung von unbekannten sids
@@ -582,8 +582,8 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
memcpy(sid,((BuddyListGamesPacket*)content)->sids->at(i),16);
//ab ins array damit
sids->push_back(sid);
- }
- else
+ }
+ else
{
if(entry->game==0&&
entry->hcontact!=0&&
@@ -629,7 +629,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
xfire_newc.username=(char*)invite->name.c_str();
xfire_newc.nick=(char*)invite->nick.c_str();
xfire_newc.id=0;
-
+
HANDLE handle=CList_AddContact(xfire_newc,TRUE,TRUE,0);
if(handle) { // invite nachricht mitsenden
@@ -638,7 +638,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
PROTORECVEVENT pre;
str=(char*)invite->msg.c_str();
-
+
time_t t = time(NULL);
ccs.szProtoService = PSR_MESSAGE;
ccs.hContact = handle;
@@ -665,7 +665,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
case XFIRE_CLAN_PACKET:
{
char temp[100];
- XFireClanPacket *clan = (XFireClanPacket*)content;
+ XFireClanPacket *clan = (XFireClanPacket*)content;
for(int i=0;i<clan->count;i++)
{
@@ -687,7 +687,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
break;
case XFIRE_LOGIN_SUCCESS_ID: //login war erfolgreich
{
- LoginSuccessPacket *login = (LoginSuccessPacket*)content;
+ LoginSuccessPacket *login = (LoginSuccessPacket*)content;
char * temp = mir_utf8decode((char*)login->nick.c_str(),NULL);
//nick speichern
DBWriteContactSettingString(NULL,protocolname,"Nick",temp);
@@ -703,7 +703,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
case XFIRE_RECV_OLDVERSION_PACKET_ID:
{
- RecvOldVersionPacket *version = (RecvOldVersionPacket*)content;
+ RecvOldVersionPacket *version = (RecvOldVersionPacket*)content;
char temp[255];
if((unsigned int)client->protocolVersion<(unsigned int)version->newversion)
@@ -764,7 +764,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) {
CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)ccs.hContact,PROTOTYPE_CONTACTTYPING_OFF);
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
-
+
}
}
else if( (( MessagePacket*)content)->getMessageType() == 3) {
@@ -872,7 +872,7 @@ void StartIniUpdateAndDetection(LPVOID dummy)
if(DBGetContactSettingByte(NULL,protocolname,"autoiniupdate",0))
UpdateMyXFireIni(NULL);
if(DBGetContactSettingByte(NULL,protocolname,"autoicodllupdate",0))
- UpdateMyIcons(NULL);
+ UpdateMyIcons(NULL);
#ifndef NO_PTHREAD
void* (*func)(void*) = &inigamedetectiont;
@@ -906,7 +906,7 @@ int UrlCall(WPARAM wparam,LPARAM lparam) {
//nach = suchen
char*g=strchr(q,'=');
//gefunden? dann abschneiden
- if(g)
+ if(g)
{
*g=0;
g++;
@@ -1085,7 +1085,7 @@ int ExtraListRebuild(WPARAM wparam, LPARAM lparam)
return xgamelist.iconmngr.resetIconHandles();
}
-int ExtraImageApply(WPARAM wparam, LPARAM lparam)
+int ExtraImageApply(WPARAM wparam, LPARAM lparam)
{
HANDLE hContact=(HANDLE)wparam;
if(ServiceExists(MS_CLIST_EXTRA_SET_ICON))
@@ -1193,7 +1193,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
strcpy(servicefunction, protocolname);
strcat(servicefunction, PS_GETMYAVATAR);
CreateServiceFunction(servicefunction, GetMyAvatar);
-
+
//nur bei miranda8 den iconrefresh machen
if(miranda8) {
HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, ExtraImageApply);
@@ -1219,7 +1219,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
strcpy(servicefunction, protocolname);
strcat(servicefunction, PSR_MESSAGE);
CreateServiceFunction( servicefunction, RecvMessage );
-
+
strcpy(servicefunction, XFIRE_URLCALL);
CreateServiceFunction( servicefunction, UrlCall );
@@ -1337,7 +1337,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
mi.pszName = LPGEN("Remove F&riend ...");
removefriend=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
- //block user
+ //block user
strcpy(servicefunction, protocolname);
strcat(servicefunction, "BlockFriend");
CreateServiceFunction(servicefunction,BlockFriend);
@@ -1406,22 +1406,18 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
XFireLog("Wasn't able to get GetExtendedUdpTable function");
}
- if(ServiceExists(MS_SKIN2_GETICON))
- {
- char szFile[MAX_PATH];
- GetModuleFileNameA(hinstance, szFile, MAX_PATH);
-
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszDefaultFile = szFile;
- sid.cx = sid.cy = 16;
- sid.pszSection = (char*)LPGEN( "Protocols/XFire" );
- sid.pszName = "XFIRE_main";
- sid.pszDescription = (char*)Translate("Protocol icon");
- sid.iDefaultIndex = -IDI_TM;
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
+ char szFile[MAX_PATH];
+ GetModuleFileNameA(hinstance, szFile, MAX_PATH);
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszDefaultFile = szFile;
+ sid.cx = sid.cy = 16;
+ sid.pszSection = (char*)LPGEN( "Protocols/XFire" );
+ sid.pszName = "XFIRE_main";
+ sid.pszDescription = (char*)Translate("Protocol icon");
+ sid.iDefaultIndex = -IDI_TM;
+ Skin_AddIcon(&sid);
return 0;
}
@@ -1467,7 +1463,7 @@ static void SetStatusLate( LPVOID param )
Sleep(1000);
if(bpStatus==ID_STATUS_OFFLINE)
{
- SetStatus((WPARAM)param,(LPARAM)NULL);
+ SetStatus((WPARAM)param,0);
}
}
@@ -1493,10 +1489,10 @@ static int UserIsTyping(WPARAM wParam, LPARAM lParam)
if(myClient!=NULL)
if(myClient->client->connected)
if(!DBGetContactSettingTString(hContact, protocolname, "Username",&dbv))
- {
+ {
SendTypingPacket typing;
typing.init(myClient->client, dbv.pszVal);
- myClient->client->send( &typing );
+ myClient->client->send( &typing );
DBFreeVariant(&dbv);
}
}
@@ -1575,17 +1571,9 @@ int GetName(WPARAM wParam,LPARAM lParam)
int TMLoadIcon(WPARAM wParam,LPARAM lParam)
{
if(LOWORD( wParam ) == PLI_PROTOCOL) {
- if(ServiceExists(MS_SKIN2_GETICON))
- {
- if(wParam & PLIF_ICOLIB)
- return CallService( MS_SKIN2_GETICON, 0, (LPARAM)"XFIRE_main" );
- else
- return (int)CopyIcon((HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"XFIRE_main" ));
- }
- else
- {
- return (int)LoadImage(hinstance, MAKEINTRESOURCE(IDI_TM), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL?SM_CXSMICON:SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL?SM_CYSMICON:SM_CYICON), 0);
- }
+ if(wParam & PLIF_ICOLIB)
+ return Skin_GetIcon("XFIRE_main");
+ return (int)CopyIcon( Skin_GetIcon("XFIRE_main"));
}
return NULL;
}
@@ -1619,7 +1607,7 @@ static void ConnectingThread(LPVOID params)
oldStatus = bpStatus;
bpStatus = wParam;
- ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
+ ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
LeaveCriticalSection(&connectingMutex);
}
@@ -1670,7 +1658,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam)
else
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv2.pszVal)+1,(LPARAM)dbv2.pszVal);
-
+
if(myClient!=NULL)
delete myClient;
@@ -1735,7 +1723,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam)
{
if(bpStatus == ID_STATUS_OFFLINE) // nix
{
- }
+ }
else if(myClient!=NULL&&myClient->client->connected) // online --> afk
{
//setze bei aktivem nocustomaway die alte awaystatusmsg zurück, bugfix
@@ -1757,7 +1745,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam)
//teamspeak/ventrilo pid sowie gamepid auf NULL setzen, damit bei einem reconnect die neuerkannt werden
pid=NULL;
- ts2pid=NULL;
+ ts2pid=NULL;
DBWriteContactSettingWord(NULL,protocolname,"currentgame",0);
DBWriteContactSettingWord(NULL,protocolname,"currentvoice",0);
DBDeleteContactSetting(NULL,protocolname, "VServerIP");
@@ -1777,7 +1765,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam)
bpStatus = wParam;
ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
-
+
return 0;
}
@@ -1798,11 +1786,11 @@ int GetStatus(WPARAM wParam,LPARAM lParam)
HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
{
- HANDLE hContact;
+ HANDLE hContact;
if (xfc.username == NULL)
return 0;
-
+
// here we create a new one since no one is to be found
hContact = (HANDLE) CallService( MS_DB_CONTACT_ADD, 0, 0);
if ( hContact ) {
@@ -1825,13 +1813,13 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
DBWriteContactSettingTString(hContact, protocolname, "Nick", xfc.username);
DBWriteContactSettingTString(hContact, protocolname, "Username", xfc.username);
-
+
//DBWriteContactSettingTString(hContact, protocolname, "Screenname", xfc.nick);
DBWriteContactSettingDword(hContact, protocolname, "UserId", xfc.id);
if(clan>0)
DBWriteContactSettingDword(hContact, protocolname, "Clan", clan);
-
+
DBWriteContactSettingWord(hContact, protocolname, "Status", SetOnline ? ID_STATUS_ONLINE:ID_STATUS_OFFLINE);
if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==0)
@@ -1846,8 +1834,8 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
}
else
{
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
+ /*
+ scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
getestet mit clanbuddy's >270 members
mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
@@ -1863,7 +1851,7 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
if (xfc.id==0) {
DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
DBWriteContactSettingByte( hContact, "CList", "Hidden", 1 );
- }
+ }
return hContact;
}
@@ -1893,7 +1881,7 @@ HANDLE CList_FindContact (int uid)
{
return (HANDLE)hContact;
}
- }
+ }
hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
return 0;
@@ -1967,7 +1955,7 @@ void CList_MakeAllOffline()
}
}
DBWriteContactSettingWord(hContact,protocolname,"Status",ID_STATUS_OFFLINE);
- }
+ }
hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
//alle gefundenen handles lsöchen
@@ -2001,7 +1989,7 @@ void SetAvatar2(LPVOID lparam) {
GetBuddyInfo* buddyinfo=(GetBuddyInfo*)lparam;
if(myClient!=NULL)
if(myClient->client->connected)
- myClient->client->send( buddyinfo );
+ myClient->client->send( buddyinfo );
delete lparam;
lasttime-=sleep;
@@ -2054,7 +2042,7 @@ void SetAvatar(LPVOID lparam)
}
BOOL GetAvatar(char* username,XFireAvatar* av)
-{
+{
BOOL status=FALSE;
if(av==NULL||username==NULL)
@@ -2072,7 +2060,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av)
nlhr.szUrl = address;
nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
+
if(nlhrReply) {
//nicht auf dem server
if (nlhrReply->resultCode != 200) {
@@ -2088,7 +2076,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av)
else
{
//fwrite(nlhrReply->pData,nlhrReply->dataLength,1,f);
-
+
//id wo angefangen wird, die adresse "rauszuschneiden"
char avatarid[]="m_user_avatar_img_wrapper";
char* pointer_av=avatarid;
@@ -2102,7 +2090,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av)
{
if(*pointer_av==*pointer)
{
- pointer_av++;
+ pointer_av++;
if(pointer_av-avatarid>4)
found=TRUE;
}
@@ -2357,7 +2345,7 @@ int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
else
DBFreeVariant(&dbv2);
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )vipport, ( LPARAM )&clmi2 );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )vipport, ( LPARAM )&clmi2 );
//clansite nur bei clanmembern anbieten
if(DBGetContactSettingDword((HANDLE)wParam, protocolname, "Clan",0)==0)
@@ -2385,7 +2373,7 @@ int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
//gameobject holen
Xfire_game* game=xgamelist.getGamebyGameid(gameid);
//hat das spiel netzwerkparameter?
- if(game)
+ if(game)
{
if(game->networkparams)
{
@@ -2436,7 +2424,7 @@ void SetXFireGameStatusMsg(Xfire_game* game)
{
char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
static char statusmsg[100]="";
-
+
//kein gameobject, dann abbrechen
if(!game) return;
@@ -2559,7 +2547,7 @@ void gamedetectiont(LPVOID lparam)
if(myClient!=NULL)
myClient->client->send( packet );
}
- delete packet;
+ delete packet;
}
else
@@ -2585,15 +2573,15 @@ void gamedetectiont(LPVOID lparam)
DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Mumble");
DBWriteContactSettingWord(NULL,protocolname,"currentvoice",vid);
-
+
sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
-
+
if(myClient!=NULL)
myClient->client->send( packet );
}
}
- delete packet;
+ delete packet;
}
}
else
@@ -2613,7 +2601,7 @@ void gamedetectiont(LPVOID lparam)
if(myClient!=NULL)
myClient->client->send( packet );
ts2pid=0;
- delete packet;
+ delete packet;
}
else
{
@@ -2633,7 +2621,7 @@ void gamedetectiont(LPVOID lparam)
myClient->client->send( packet );
}
}
- delete packet;
+ delete packet;
}
//if(op!=NULL) CloseHandle(op);
}
@@ -2664,7 +2652,7 @@ void gamedetectiont(LPVOID lparam)
if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
if(myClient!=NULL)
myClient->client->send( packet );
-
+
//spielzeit messen
time_t t2=time(NULL);
time_t t3=t2-t1;
@@ -2683,7 +2671,7 @@ void gamedetectiont(LPVOID lparam)
sprintf(temp,Translate("Last game: %s playtime: %.2d:%.2d:%.2d"),currentgame->name,mytm->tm_hour,mytm->tm_min,mytm->tm_sec);
DBWriteContactSettingTString(NULL, protocolname, "LastGame", temp);
-
+
if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
SetOldStatusMsg();
@@ -2696,7 +2684,7 @@ void gamedetectiont(LPVOID lparam)
{
if(ServiceExists("PopUp/EnableDisableMenuCommand"))
{
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
+ CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
}
else if(ServiceExists("PopUp/ToggleEnabled"))
{
@@ -2714,14 +2702,14 @@ void gamedetectiont(LPVOID lparam)
//bug beseitigt, wenn spiel beendet, alte ip entfernen
DBDeleteContactSetting(NULL,protocolname, "ServerIP");
-
+
pid=NULL;
currentgame=NULL;
xgamelist.SetGameStatus(FALSE);
NotifyEventHooks(hookgamestart,0,0);
- delete packet;
+ delete packet;
}
else //noch offen
{
@@ -2736,7 +2724,7 @@ void gamedetectiont(LPVOID lparam)
//XFireLog("IPPort detection ...","");
if(GetServerIPPort(pid,myClient->client->localaddr,myClient->client->llocaladdr,&packet->ip[3],&packet->ip[2],&packet->ip[1],&packet->ip[0],&packet->port))
{
-
+
if(packet->ip[3]!=0)
{
sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
@@ -2753,7 +2741,7 @@ void gamedetectiont(LPVOID lparam)
if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
SetGameStatusMsg();
}
- delete packet;
+ delete packet;
}
//XFireLog("fertig ...","");
//packet->=xf[currentgame].gameid2;
@@ -2770,7 +2758,7 @@ void gamedetectiont(LPVOID lparam)
processInfo->dwSize = sizeof ( PROCESSENTRY32);
XFireLog("XFire Gamedetection - Suche laufende Spiele ...");
-
+
//gamelist blocken
xgamelist.Block(TRUE);
@@ -2787,7 +2775,7 @@ void gamedetectiont(LPVOID lparam)
if(nextgame->checkpath(processInfo))
{
SendGameStatusPacket *packet = new SendGameStatusPacket() ;
-
+
XFireLog("XFire Gamedetection - Spiel gefunden: %i",nextgame->id);
if(myClient!=NULL)
@@ -2799,7 +2787,7 @@ void gamedetectiont(LPVOID lparam)
DBWriteContactSettingString(NULL,protocolname,"currentgamename",currentgame->name);
packet->gameid=currentgame->send_gameid;
t1=time(NULL);
-
+
if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
{
XFireLog("XFire Gamedetection - Sendgame-ID: %i",currentgame->send_gameid);
@@ -2832,7 +2820,7 @@ void gamedetectiont(LPVOID lparam)
if(ServiceExists("PopUp/EnableDisableMenuCommand")&&DBGetContactSettingByte(NULL,"PopUp","ModuleIsEnabled",0)==1&&DBGetContactSettingByte(NULL,"PopUp","DisableWhenFullscreen",0)==0) /**/
{
disabledpopups=TRUE;
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
+ CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
}
else if(ServiceExists("PopUp/ToggleEnabled")&&DBGetContactSettingByte(NULL,"YAPP","Enabled",0)==1)
{
@@ -2854,7 +2842,7 @@ void gamedetectiont(LPVOID lparam)
}
}
}
- CloseHandle ( hSnapShot);
+ CloseHandle ( hSnapShot);
//gamelist unblocken
xgamelist.Block(FALSE);
@@ -2898,7 +2886,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg)
&& *(away+2)=='F'
&& *(away+3)=='K'
&& *(away+4)==')')
- ||
+ ||
(*(away)=='('
&&*(away+1)=='A'
&& *(away+2)=='B'
@@ -2929,7 +2917,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg)
strcat(temp2," ");
DBFreeVariant(&dbv);
}
-
+
if(DBGetContactSettingByte(NULL,protocolname,"noipportinstatus",0)==0)
{
if(!DBGetContactSettingTString(entry->hcontact,protocolname, "ServerName",&dbv))
@@ -2949,7 +2937,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg)
}
}
}
-
+
strncpy(status,temp2,97);
if(strlen(entry->statusmsg.c_str())>0)
@@ -2993,8 +2981,8 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg)
}
else
{
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
+ /*
+ scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
getestet mit clanbuddy's >270 members
mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
@@ -3047,12 +3035,12 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
if(strlen(entry->nick.c_str())>0&&DBGetContactSettingByte(NULL,protocolname,"shownicks",1))
{
char*nick=NULL;
-
+
if(myClient->useutf8)
nick=( char* )entry->nick.c_str();
else
nick=mir_utf8decode(( char* )entry->nick.c_str(),NULL);
-
+
if(nick)
{
if(myClient->useutf8)
@@ -3098,7 +3086,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
DBWriteContactSettingTString(hContact, protocolname, "GameInfo", entry->gameinfo.c_str());
//beim voicechat foglendes machn
- if(entry->game2>0)
+ if(entry->game2>0)
{
gameob=(DummyXFireGame*)entry->game2Obj; //obj wo ip und port sind auslesen
@@ -3120,7 +3108,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
DBDeleteContactSetting(hContact, protocolname, "VPort");
}
}
-
+
DBWriteContactSettingWord(hContact, protocolname, "VoiceId", entry->game2);
SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(entry->game2),EXTRA_ICON_ADV2); //icon seperat setzen
@@ -3133,7 +3121,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
DBDeleteContactSetting(hContact, protocolname, "VoiceId");
SetIcon(hContact,(HANDLE)-1,EXTRA_ICON_ADV2);
}
-
+
//beim game folgendes machen
if(entry->game>0)
{
@@ -3169,7 +3157,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
//nein dann username
entry->username.c_str():
//klar, dann nick nehmen
- entry->nick.c_str())
+ entry->nick.c_str())
,gname,(unsigned char)gameob->ip[3],(unsigned char)gameob->ip[2],(unsigned char)gameob->ip[1],(unsigned char)gameob->ip[0],(unsigned long)gameob->port);
}
}
@@ -3207,7 +3195,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
}
}
}
-
+
if(gameob)
{
if((unsigned char)gameob->ip[3]!=0)
@@ -3318,7 +3306,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
if(clan>0)
{
int val=DBGetContactSettingByte(NULL,protocolname,"mainclangroup",0);
-
+
if( DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==0 ||
(DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==1&&
DBGetContactSettingByte(entry->hcontact, protocolname, "isfriend", 0)==0)
@@ -3346,7 +3334,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
else if(clan==-1)//hauptgruppe für fof
{
int val=DBGetContactSettingByte(NULL,protocolname,"fofgroup",0);
-
+
if(val==0)
{
DBWriteContactSettingTString(entry->hcontact, "CList", "Group", group);
@@ -3380,7 +3368,7 @@ int AddtoList( WPARAM wParam, LPARAM lParam ) {
if (ccs->hContact)
{
- DBVARIANT dbv2;
+ DBVARIANT dbv2;
if(!DBGetContactSetting(ccs->hContact,protocolname,"Username",&dbv2)) {
if(myClient!=NULL)
@@ -3390,7 +3378,7 @@ int AddtoList( WPARAM wParam, LPARAM lParam ) {
accept.name = dbv2.pszVal;
myClient->client->send(&accept );
}
-
+
//temporären buddy entfernen, da eh ein neues packet kommt
DBWriteContactSettingByte(ccs->hContact, protocolname, "DontSendDenyPacket", 1);
CallService(MS_DB_CONTACT_DELETE, (WPARAM) ccs->hContact, 0);
@@ -3478,8 +3466,8 @@ void CreateGroup(char*grpn,char*field) {
DBWriteContactSettingByte(NULL,protocolname,field,0);
}
}
-
-
+
+
char group[255]="";
char temp[10];
int i=0;
@@ -3552,7 +3540,7 @@ int SetAwayMsg(WPARAM wParam, LPARAM lParam) {
static void SendAMAck( LPVOID param )
{
DBVARIANT dbv;
-
+
if(!DBGetContactSettingTString((HANDLE)param, protocolname, "XStatusMsg",&dbv))
{
ProtoBroadcastAck(protocolname, (HANDLE)param, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, LPARAM(dbv.pszVal));
@@ -3627,7 +3615,7 @@ int StartGame(WPARAM wParam,LPARAM lParam,LPARAM fParam) {
xgamelist.Block(TRUE);
Xfire_game*game=xgamelist.getGamebyGameid(fParam);
-
+
//starte das spiel
if(game)
game->start_game();
@@ -3702,7 +3690,7 @@ int StartThisGame(WPARAM wParam,LPARAM lParam) {
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
-
+
//starte das spiel
if(game)
game->start_game();
@@ -3722,7 +3710,7 @@ int JoinGame(WPARAM wParam,LPARAM lParam) {
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
-
+
//starte das spiel
if(game)
{
@@ -3754,7 +3742,7 @@ int doneQuery( WPARAM wParam, LPARAM lParam ) {
sprintf(temp,"(%d/%d)",gameinfo->players,gameinfo->maxplayers);
DBWriteContactSettingTString(bud->hcontact, protocolname, "Players", temp);
DBWriteContactSettingByte(bud->hcontact, protocolname, "Passworded", gameinfo->password);
-
+
if(myClient!=NULL)
handlingBuddys(bud,0,NULL,TRUE);
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp b/plugins/!NotAdopted/Xfire/xfiretest/options.cpp
index b87e9133d8..10e4fbb25a 100644
--- a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp
+++ b/plugins/!NotAdopted/Xfire/xfiretest/options.cpp
@@ -642,7 +642,7 @@ static BOOL CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
dbces.pfnEnumProc = enumSettingsProc;
dbces.szModule = "XFireBlock";
dbces.lParam = (LPARAM)hwndDlg;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0,(LPARAM)&dbces);
SendMessage(GetDlgItem(hwndDlg,IDC_REMUSER),BM_SETIMAGE,IMAGE_ICON,(WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
@@ -669,9 +669,9 @@ static BOOL CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if(sel!=LB_ERR) //nur wenn was ausgewählt wurde
{
SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETTEXT, sel, (LPARAM)temp);
- SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_DELETESTRING, sel, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_DELETESTRING, sel, 0);
DBDeleteContactSetting(NULL,"XFireBlock",temp);
- if(SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCOUNT, (WPARAM)0, (LPARAM)0)==0)
+ if(SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCOUNT, 0, 0)==0)
EnableDlgItem(hwndDlg, IDC_REMUSER, FALSE);
}
}
@@ -996,7 +996,7 @@ static BOOL CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if(hicon)
SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)hicon,0);
else
- SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)NULL,0);
+ SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,0,0);
//elemente aktivieren
EnableDlgItem(hwndDlg, IDC_DONTDETECT, TRUE);
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp b/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp
index 8de46776d8..44e755cd28 100644
--- a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp
+++ b/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp
@@ -1,5 +1,5 @@
/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
+ * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
*
* Copyright (C) 2010 by
* dufte <dufte@justmail.de>
@@ -21,7 +21,7 @@
* Based on J. Lawler - BaseProtocol
* Herbert Poul/Beat Wolf - xfirelib
*
- * Miranda ICQ: the free icq client for MS Windows
+ * Miranda ICQ: the free icq client for MS Windows
* Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
*
*/
@@ -96,15 +96,9 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi
if (bIconsNotLoaded)
{
- if (ServiceExists(MS_SKIN2_GETICON))
- {
- hicNotify = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_notify");
- hicWarning = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_warning");
- hicError = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_error");
- }
- if (!hicNotify) hicNotify = LoadIcon(NULL, IDI_INFORMATION);
- if (!hicWarning) hicWarning = LoadIcon(NULL, IDI_WARNING);
- if (!hicError) hicError = LoadIcon(NULL, IDI_ERROR);
+ hicNotify = Skin_GetIcon("popup_notify");
+ hicWarning = Skin_GetIcon("popup_warning");
+ hicError = Skin_GetIcon("popup_error");
bIconsNotLoaded = FALSE;
}
@@ -201,7 +195,7 @@ void MessageE(LPVOID msg)
switch(DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0))
{
case 0:
- if(!already)
+ if(!already)
{
already=TRUE; //keine doppelte fehlernachrichten
Message(msg);
@@ -250,7 +244,7 @@ char* GetLaunchPath(char*launch)
{
*(strrchr(temp,'\\'))=0;
}
-
+
return temp;
}
//roll bits, vllt ein tickschneller als die funktionen von winsock
@@ -408,7 +402,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
//socker erstellen
- SOCKET s;
+ SOCKET s;
s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
if(s==INVALID_SOCKET)
{
@@ -417,13 +411,13 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
closesocket(s);
return FALSE;
}
-
+
static struct sockaddr_in msockaddr;
memset(&msockaddr,0,sizeof(msockaddr));
msockaddr.sin_addr.s_addr = localaddr;
msockaddr.sin_family = AF_INET;
msockaddr.sin_port = 0;
-
+
//socket an nw binden
if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
{
@@ -432,7 +426,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
closesocket(s);
return FALSE;
}
-
+
//wir wollen alles was da reinkommt haben
static int I = 1;
static DWORD b;
@@ -501,7 +495,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
DUMP("Dump Full packet##############","");
DUMP("Headersize: %d",(temp.ipv & 0x0f)*4);*/
-
+
temp3=(char*)&temp;
temp3+=(temp.ipv & 0x0f)*4;
temp2=(udp*)temp3;
@@ -512,7 +506,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
DUMP("Dump Udp##############","");*/
- for(unsigned int i = 0 ; i < localport.size() ; i++)
+ for(unsigned int i = 0 ; i < localport.size() ; i++)
{
//DUMP("destport %d ==",temp2->dstport);
//DUMP("== %d",localport.at(i));
@@ -536,7 +530,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1,
XFireLog("got ip!");
return TRUE;
}
-
+
XFireLog("no serverip found!");
return FALSE;
}
@@ -621,22 +615,22 @@ BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1
//socker erstellen
- SOCKET s;
+ SOCKET s;
s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
-
+
static struct sockaddr_in msockaddr;
memset(&msockaddr,0,sizeof(msockaddr));
msockaddr.sin_addr.s_addr = localaddr;
msockaddr.sin_family = AF_INET;
msockaddr.sin_port = 0;
-
+
//socket an nw binden
if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
{
closesocket(s);
return FALSE;
}
-
+
//wir wollen alles was da reinkommt haben
static int I = 1;
DWORD b;
@@ -699,7 +693,7 @@ BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1
temp2=(udp*)temp3;
temp4=(mpacket2*)&temp;
- for(unsigned int i = 0 ; i < localport.size() ; i++)
+ for(unsigned int i = 0 ; i < localport.size() ; i++)
if(temp2->dstport==localport.at(i)/*FIX: für XP SP3 ->*/&&temp4->srcip!=localaddr) //ist das ziel des packets, gleich dem port des spiels
{
*port=r(temp2->srcport); //ja dann serverdaten an gamethread übermitteln
@@ -816,7 +810,7 @@ BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain)
//commandline bekommen, siehe link oben
ULONG rc = _ZwQueryInformationProcess(hProcess,ProcessBasicInformation,&ProcessInfo,sizeof(ProcessInfo),NULL);
-
+
rc = _ZwReadVirtualMemory(hProcess,ProcessInfo.PebBaseAddress, UserPool, sizeof(PEB), NULL);
peb = (PPEB)UserPool;
@@ -839,7 +833,7 @@ BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain)
buffer=(WCHAR*)new char[uSize];
rc = _ZwReadVirtualMemory(hProcess, pBaseAddress, buffer, uSize, NULL);
-
+
//in ansi umwandeln
int correctsize=WideCharToMultiByte(CP_OEMCP, 0, buffer, -1, NULL, 0, NULL, NULL);
@@ -951,7 +945,7 @@ BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf,un
if(GetFileAttributes(filename)!=0xFFFFFFFF)
{
Netlib_Logf(hNetlib,"%s already exists, no overwrite.",filename);
- return TRUE;
+ return TRUE;
}
}
Netlib_Logf(hNetlib,"Download Url %s ...",address);
@@ -964,7 +958,7 @@ BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf,un
nlhr.szUrl = address;
nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
+
if(nlhrReply) {
//nicht auf dem server
if (nlhrReply->resultCode != 200) {