summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/BuddyPounce
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/!NotAdopted/BuddyPounce')
-rw-r--r--plugins/!NotAdopted/BuddyPounce/InstallScript.xml25
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.dllbin0 -> 45056 bytes
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.dsp127
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.dsw29
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.ncbbin0 -> 66560 bytes
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.optbin0 -> 51712 bytes
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce.plg38
-rw-r--r--plugins/!NotAdopted/BuddyPounce/buddypounce_readme.txt83
-rw-r--r--plugins/!NotAdopted/BuddyPounce/dialog.c668
-rw-r--r--plugins/!NotAdopted/BuddyPounce/headers.h101
-rw-r--r--plugins/!NotAdopted/BuddyPounce/icon1.icobin0 -> 2166 bytes
-rw-r--r--plugins/!NotAdopted/BuddyPounce/main.c300
-rw-r--r--plugins/!NotAdopted/BuddyPounce/resource.apsbin0 -> 41088 bytes
-rw-r--r--plugins/!NotAdopted/BuddyPounce/resource.h81
-rw-r--r--plugins/!NotAdopted/BuddyPounce/resource.rc312
15 files changed, 1764 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/BuddyPounce/InstallScript.xml b/plugins/!NotAdopted/BuddyPounce/InstallScript.xml
new file mode 100644
index 0000000000..55252c2908
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/InstallScript.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<installscript>
+ <info>
+ <name>Buddy Pounce</name>
+ <author>Jonathan Gordon</author>
+ <version>0.3</version>
+ <type>plugin</type>
+ </info>
+
+ <packageinfo>
+ <title>Main Files</title>
+ <file>buddypounce.dll</file>
+ </packageinfo>
+
+ <packageinfo>
+ <title>Documentation and Translation</title>
+ <file>buddypounce_readme.txt</file>
+ <optional/>
+ </packageinfo>
+
+ <autorun>
+ <file>buddypounce_readme.txt</file>
+ <document/>
+ </autorun>
+</installscript> \ No newline at end of file
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.dll b/plugins/!NotAdopted/BuddyPounce/buddypounce.dll
new file mode 100644
index 0000000000..5acf868e4d
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.dll
Binary files differ
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.dsp b/plugins/!NotAdopted/BuddyPounce/buddypounce.dsp
new file mode 100644
index 0000000000..a61754e2fd
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.dsp
@@ -0,0 +1,127 @@
+# Microsoft Developer Studio Project File - Name="buddypounce" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=buddypounce - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "buddypounce.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "buddypounce.mak" CFG="buddypounce - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "buddypounce - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "buddypounce - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "buddypounce - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BUDDYPOUNCE_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BUDDYPOUNCE_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0xc09 /d "NDEBUG"
+# ADD RSC /l 0xc09 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "buddypounce - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BUDDYPOUNCE_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BUDDYPOUNCE_EXPORTS" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0xc09 /d "_DEBUG"
+# ADD RSC /l 0xc09 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"d:\mim\plugins\buddypounce.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "buddypounce - Win32 Release"
+# Name "buddypounce - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\dialog.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\headers.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\icon1.ico
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.dsw b/plugins/!NotAdopted/BuddyPounce/buddypounce.dsw
new file mode 100644
index 0000000000..3b2222d700
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "buddypounce"=.\buddypounce.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.ncb b/plugins/!NotAdopted/BuddyPounce/buddypounce.ncb
new file mode 100644
index 0000000000..9b90dbd9e8
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.ncb
Binary files differ
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.opt b/plugins/!NotAdopted/BuddyPounce/buddypounce.opt
new file mode 100644
index 0000000000..6cb2b12472
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.opt
Binary files differ
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce.plg b/plugins/!NotAdopted/BuddyPounce/buddypounce.plg
new file mode 100644
index 0000000000..13b190b1ed
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce.plg
@@ -0,0 +1,38 @@
+<html>
+<body>
+<pre>
+<h1>Build Log</h1>
+<h3>
+--------------------Configuration: buddypounce - Win32 Release--------------------
+</h3>
+<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP121.tmp" with contents
+[
+/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "BUDDYPOUNCE_EXPORTS" /Fp"Release/buddypounce.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
+"D:\mim_sources\buddypounce\dialog.c"
+"D:\mim_sources\buddypounce\main.c"
+]
+Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP121.tmp"
+Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP122.tmp" with contents
+[
+kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/buddypounce.pdb" /machine:I386 /out:"Release/buddypounce.dll" /implib:"Release/buddypounce.lib"
+.\Release\dialog.obj
+.\Release\main.obj
+.\Release\resource.res
+]
+Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP122.tmp"
+<h3>Output Window</h3>
+Compiling...
+dialog.c
+win2k.h
+main.c
+Linking...
+ Creating library Release/buddypounce.lib and object Release/buddypounce.exp
+
+
+
+<h3>Results</h3>
+buddypounce.dll - 0 error(s), 0 warning(s)
+</pre>
+</body>
+</html>
diff --git a/plugins/!NotAdopted/BuddyPounce/buddypounce_readme.txt b/plugins/!NotAdopted/BuddyPounce/buddypounce_readme.txt
new file mode 100644
index 0000000000..a84612a1ab
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/buddypounce_readme.txt
@@ -0,0 +1,83 @@
+Buddy Pounce
+-------------
+
+Buddy Pounce allows you to send a message to a contact automatically when they change status (i.e from offline) if you are expecting to be away form the computer.
+This bassically adds "Offline Messaging" to protocols that dont have it (i.e MSN)
+
+HOW To use it.
+---------------
+Right click the contact you want to send the message to. choose the Buddy Pounce item.
+If you havnt edited the options yet you will be at the "simple" window. by default any message you type here will be sent to the contact when they change status. (dont worry the default behaviour can be changed in the options).
+Pressing the "advanced >>" button will open the advanced window. Here you have full power of when to send the message.
+Firstly, make sure the contact you want to send to is selected in the drop list at the top right.
+next type your message.
+Now the fun begins.....
+
+The Settings Explained...
+- "send if My Status Is..." - selecting this will open up a window with 10 check boxes. basically the message will only be sent if your status matches any checked statuses here.
+- "Send if they change status to..." - bassicaly the same as above, cept it will only send if they changed to a checked status
+----------- the next 3 options can all be set to 0 to ignore them
+- "Reuse Pounce" - if this is set to anything but 0 the messsage will be sent the next X times the contact changes to the specified status
+- "Give Up Delay" - will not try to send the message if the contact doesnt change to the specified status after X days
+- "Confirmation Window" - with this set, a window will popup asking you if you want to send the message. It will automatically be sent in X seconds if you dont press cancel. if its set to 1024 then it will never send unless you press OK (sort of useless then...)
+
+(the advanced dialog has 2 buttons... delete pounce which deletes the pounce ! :O, and load deafults which overwrights any settings with the default ones from the options.)
+the simple window uses the default options to send the message...
+
+Explanation of options window
+-----------------------------
+"Use Advanced Dialog" - if this is checked then the advanced window will be automatically opened
+"Show Delivery Messages" - if this is checked a window will poup saying the message was un/successfully sent to the contact.
+"Default Settings" - excatly the same as the settings as explained above... any values set here will be used as the values for the "simple" window, and will be automatically set when u load the buddy pounce windw.
+
+
+FOR DEVELOPERS:
+---------------
+
+in the of-chance you want to setup a pounce in your own plugins i have added 2 service funcitons you can use.
+call both of these like CallService(SERVICE, (WPARAM)hContact, (LPARAM)message)
+where hContact is the HANDLE to a valid contact, and message is a pointer to a string to use as the message
+"BuddyPounce/AddSimplePounce" - which sets a new pounce using the message u supply and the defalt settings
+"BuddyPounce/AddToPounce" - which adds your text to an exsisnting pounce message, or call the above service if 1 doesnt exsist.
+it doesnt really matter which u call, but to check if a message exsists check if the string (hContact, "buddypounce", "PounceMsg") exsists..
+if you want to setup an "advanced" pounce you will have to setup the other settings manually... email me @ jdgordy@gmail.com for info...)
+
+Translation:
+------------
+the following strings can be translated....
+Send If My Status Is...
+Send If They Change Status to...
+Reuse Pounce
+Give Up delay
+Confirmation Window
+Send a File
+Send If My Status Is
+Any
+Online
+NA
+Occupied
+DND
+Free For Chat
+Invisible
+On The Phone
+Out To Lunch
+Send If Their Status changes
+From Offline
+To Online
+To NA
+To Occupied
+To DND
+To Free For Chat
+To Invisible
+To On The Phone
+To Out To Lunch
+The Message (%d Characters) **** make sure u keep the %d in this 1
+Pounce being sent to %s in %d seconds **** and the %s and %d in the same order in this 1
+
+the dialogs also need to be translated but im falling asleep and want to relase the plugin...
+
+
+Change-log:
+-----------
+0.3
+- completly re-written \ No newline at end of file
diff --git a/plugins/!NotAdopted/BuddyPounce/dialog.c b/plugins/!NotAdopted/BuddyPounce/dialog.c
new file mode 100644
index 0000000000..8ba7f132e3
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/dialog.c
@@ -0,0 +1,668 @@
+#include "headers.h"
+
+void populateSettingsList(HWND hwnd2List)
+{
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Send If My Status Is..."));
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Send If They Change Status to..."));
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)"----------------------------");
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Reuse Pounce"));
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Give Up delay"));
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Confirmation Window"));
+// SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)"----------------------------"));
+// SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)Translate("Send a File"));
+}
+
+void populateContacts(HANDLE BPhContact,HWND hwnd2CB)
+{
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ char name[300], *szProto;
+ int index, selectedIndex = 0;
+ while (hContact)
+ {
+ szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM))
+ {
+ _snprintf(name, 300, "%s (%s)", (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0), szProto);
+ index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
+ SendMessage(hwnd2CB, CB_SETITEMDATA, index, (LPARAM)hContact);
+ if (BPhContact == hContact) SendMessage(hwnd2CB, CB_SETCURSEL, index, 0);
+ }
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ }
+}
+
+
+void saveLastSetting(HANDLE hContact, HWND hwnd)
+{
+ char number[8], string[1024];
+ switch (DBGetContactSettingByte(hContact, modname, "LastSetting", 2)) // nothing to do
+ {
+ case 0: // Send If My Status Is...
+ break;
+ case 1: // Send If They Change status to
+ break;
+ case 2: // ------, fall through
+ case 6: // nothing to do...
+ break;
+ case 3: // Reuse Pounce
+ GetDlgItemText(hwnd, IDC_SETTINGNUMBER, number, 8);
+ DBWriteContactSettingByte(hContact, modname, "Reuse", (BYTE)atoi(number));
+ break;
+ case 4: // Give Up delay
+ GetDlgItemText(hwnd, IDC_SETTINGNUMBER, number, 8);
+ DBWriteContactSettingByte(hContact, modname, "GiveUpDays", (BYTE)atoi(number));
+ {
+ time_t today = time(NULL);
+ DBWriteContactSettingDword(hContact, modname, "GiveUpDate", (DWORD)(atoi(number)*SECONDSINADAY));
+ }
+ break;
+ case 5: // confirm window
+ GetDlgItemText(hwnd, IDC_SETTINGNUMBER, number, 8);
+ DBWriteContactSettingByte(hContact, modname, "ConfirmTimeout", (BYTE)atoi(number));
+ break;
+
+ case 7: // send a file
+ GetDlgItemText(hwnd, IDC_SETTINGTEXT, string, 1024);
+ DBWriteContactSettingString(hContact, modname, "FileToSend", string);
+ break;
+ }
+}
+
+void hideAll(HWND hwnd)
+{
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_BUTTON), SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGTEXT), SW_HIDE);
+}
+
+void getDefaultMessage(HWND hwnd, UINT control, HANDLE hContact)
+{
+ DBVARIANT dbv;
+ if (!DBGetContactSetting(hContact,modname, "PounceMsg", &dbv))
+ SetDlgItemText(hwnd, control, dbv.pszVal);
+ else if (!DBGetContactSetting(NULL,modname, "PounceMsg", &dbv))
+ SetDlgItemText(hwnd, control, dbv.pszVal);
+ DBFreeVariant(&dbv);
+}
+BOOL CALLBACK StatusModesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_INITDIALOG:
+ {
+ struct windowInfo *wi = (struct windowInfo *)lParam;
+ SetWindowLong(hwnd,GWL_USERDATA,(LPARAM)wi);
+ TranslateDialogDefault(hwnd);
+
+ }
+ return FALSE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDOK:
+ case IDCANCEL:
+ {
+ struct windowInfo *wi = (struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA);
+ char type[32];
+ int flag = 0;
+ GetDlgItemText(hwnd, IDC_CHECK1, type, 32);
+ flag = (IsDlgButtonChecked(hwnd, IDC_CHECK1))
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK2)<<1)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK3)<<2)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK4)<<3)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK5)<<4)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK6)<<5)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK7)<<6)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK8)<<7)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK9)<<8)
+ |(IsDlgButtonChecked(hwnd, IDC_CHECK10)<<9);
+ if (!strcmp(type, "Any"))
+ {
+ if (LOWORD(wParam) == IDOK)
+ DBWriteContactSettingWord(wi->hContact, modname, "SendIfMyStatusIsFLAG", (WORD)flag);
+ wi->SendIfMy = 0;
+ }
+ else
+ {
+ if (LOWORD(wParam) == IDOK)
+ DBWriteContactSettingWord(wi->hContact, modname, "SendIfTheirStatusIsFLAG", (WORD)flag);
+ wi->SendWhenThey = 0;
+ }
+ DestroyWindow(hwnd);
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+void statusModes(struct windowInfo *wi, int myStatusMode) // myStatusMode=1 sendIfMyStatusFlag
+{
+ int statusFlag;
+ HWND hwnd;
+
+ if (myStatusMode)
+ {
+ if (wi->SendIfMy) { SetForegroundWindow(wi->SendIfMy); return; }
+ else
+ {
+ hwnd = wi->SendIfMy = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_STATUSMODES),0,StatusModesDlgProc, (LPARAM)wi);
+ statusFlag = DBGetContactSettingWord(wi->hContact, modname, "SendIfMyStatusIsFLAG", 0);
+ SetWindowText(hwnd, Translate("Send If My Status Is"));
+ SetDlgItemText(hwnd, IDC_CHECK1, Translate("Any"));
+ SetDlgItemText(hwnd, IDC_CHECK2, Translate("Online"));
+ SetDlgItemText(hwnd, IDC_CHECK3, Translate("Away"));
+ SetDlgItemText(hwnd, IDC_CHECK4, Translate("NA"));
+ SetDlgItemText(hwnd, IDC_CHECK5, Translate("Occupied"));
+ SetDlgItemText(hwnd, IDC_CHECK6, Translate("DND"));
+ SetDlgItemText(hwnd, IDC_CHECK7, Translate("Free For Chat"));
+ SetDlgItemText(hwnd, IDC_CHECK8, Translate("Invisible"));
+ SetDlgItemText(hwnd, IDC_CHECK9, Translate("On The Phone"));
+ SetDlgItemText(hwnd, IDC_CHECK10, Translate("Out To Lunch"));
+ }
+ }
+ else
+ {
+ if (wi->SendWhenThey) { SetForegroundWindow(wi->SendWhenThey); return; }
+ else
+ {
+ hwnd = wi->SendWhenThey = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_STATUSMODES),0,StatusModesDlgProc, (LPARAM)wi);
+ statusFlag = DBGetContactSettingWord(wi->hContact, modname, "SendIfTheirStatusIsFLAG", 0);
+ SetWindowText(hwnd, Translate("Send If Their Status changes"));
+ SetDlgItemText(hwnd, IDC_CHECK1, Translate("From Offline"));
+ SetDlgItemText(hwnd, IDC_CHECK2, Translate("To Online"));
+ SetDlgItemText(hwnd, IDC_CHECK3, Translate("To Away"));
+ SetDlgItemText(hwnd, IDC_CHECK4, Translate("To NA"));
+ SetDlgItemText(hwnd, IDC_CHECK5, Translate("To Occupied"));
+ SetDlgItemText(hwnd, IDC_CHECK6, Translate("To DND"));
+ SetDlgItemText(hwnd, IDC_CHECK7, Translate("To Free For Chat"));
+ SetDlgItemText(hwnd, IDC_CHECK8, Translate("To Invisible"));
+ SetDlgItemText(hwnd, IDC_CHECK9, Translate("To On The Phone"));
+ SetDlgItemText(hwnd, IDC_CHECK10, Translate("To Out To Lunch"));
+ }
+ }
+ CheckDlgButton(hwnd, IDC_CHECK1, statusFlag&ANY);
+ CheckDlgButton(hwnd, IDC_CHECK2, (statusFlag&ONLINE)>>1);
+ CheckDlgButton(hwnd, IDC_CHECK3, (statusFlag&AWAY)>>2);
+ CheckDlgButton(hwnd, IDC_CHECK4, (statusFlag&NA)>>3);
+ CheckDlgButton(hwnd, IDC_CHECK5, (statusFlag&OCCUPIED)>>4);
+ CheckDlgButton(hwnd, IDC_CHECK6, (statusFlag&DND)>>5);
+ CheckDlgButton(hwnd, IDC_CHECK7, (statusFlag&FFC)>>6);
+ CheckDlgButton(hwnd, IDC_CHECK8, (statusFlag&INVISIBLE)>>7);
+ CheckDlgButton(hwnd, IDC_CHECK9, (statusFlag&PHONE)>>8);
+ CheckDlgButton(hwnd, IDC_CHECK10, (statusFlag&LUNCH)>>9);
+}
+
+void deletePounce(HANDLE hContact)
+{
+ DBDeleteContactSetting(hContact,modname, "PounceMsg");
+ DBDeleteContactSetting(hContact,modname, "SendIfMyStatusIsFLAG");
+ DBDeleteContactSetting(hContact,modname, "SendIfTheirStatusIsFLAG");
+ DBDeleteContactSetting(hContact,modname, "Reuse");
+ DBDeleteContactSetting(hContact, modname, "GiveUpDays");
+ DBDeleteContactSetting(hContact, modname, "GiveUpDate");
+ DBDeleteContactSetting(hContact, modname, "ConfirmTimeout");
+ DBDeleteContactSetting(hContact, modname, "FileToSend");
+}
+
+
+BOOL CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_INITDIALOG:
+ {
+ struct windowInfo *wi = (struct windowInfo *)malloc(sizeof(struct windowInfo));
+ char msg[1024];
+ if (!wi) { msg("error......","Buddy Pounce"); DestroyWindow(hwnd); }
+ TranslateDialogDefault(hwnd);
+ wi->hContact = (HANDLE)lParam;
+ wi->SendIfMy = 0;
+ wi->SendWhenThey = 0;
+ SetWindowLong(hwnd,GWL_USERDATA,(LPARAM)wi);
+ getDefaultMessage(hwnd, IDC_MESSAGE, wi->hContact);
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE)));
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ populateSettingsList(GetDlgItem(hwnd, IDC_SETTINGS));
+ populateContacts(wi->hContact, GetDlgItem(hwnd,IDC_CONTACTS));
+ SendMessage(GetDlgItem(hwnd,IDC_SPIN), UDM_SETRANGE, 0, (LPARAM) MAKELONG ((short) 1024, (short) 0));
+ DBWriteContactSettingByte(wi->hContact, modname, "LastSetting", 0);
+ }
+ return FALSE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDC_MESSAGE:
+ {
+ if (HIWORD(wParam) == EN_CHANGE)
+ {
+ int length;
+ char msg[1024];
+ length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE));
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), length);
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ }
+ }
+ break;
+ case IDC_SIMPLE:
+ case IDOK:
+ {
+ char *text;
+ HANDLE hContact = (HANDLE)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETITEMDATA, SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETCURSEL,0,0),0);
+ int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE))+1;
+ if (length>1)
+ {
+ text = (char*)malloc(length);
+ if (!text) { msg("Couldnt Allocate enough memory",""); break; }
+ GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
+ DBWriteContactSettingString(hContact, modname, "PounceMsg", text);
+ free(text);
+ }
+ else DBDeleteContactSetting(hContact, modname, "PounceMsg");
+ saveLastSetting(hContact, hwnd);
+ } // fall through
+ if (LOWORD(wParam) == IDC_SIMPLE)
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, (LPARAM)((struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA))->hContact);
+ // fall through
+ case IDCANCEL:
+ {
+ struct windowInfo *wi = (struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA);
+ if (wi->SendIfMy) DestroyWindow(wi->SendIfMy);
+ if (wi->SendWhenThey) DestroyWindow(wi->SendWhenThey);
+ free(wi);
+ DestroyWindow(hwnd);
+ }
+ break;
+ case IDC_DELETE:
+ {
+ HANDLE hContact = ((struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA))->hContact;
+ deletePounce(hContact);
+ SetDlgItemText(hwnd, IDC_MESSAGE, "");
+ SetDlgItemText(hwnd, GRP_MSG, "The Message (0 Characters)");
+ }
+ break;
+ case IDC_DEFAULT:
+ {
+ HANDLE hContact = ((struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA))->hContact;
+ char msg[1024];
+ getDefaultMessage(hwnd, IDC_MESSAGE, hContact);
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE)));
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ DBWriteContactSettingWord(hContact,modname, "SendIfMyStatusIsFLAG", (WORD)DBGetContactSettingWord(NULL, modname, "SendIfMyStatusIsFLAG",0));
+ DBWriteContactSettingWord(hContact,modname, "SendIfTheirStatusIsFLAG", (WORD)DBGetContactSettingWord(NULL, modname, "SendIfTheirStatusIsFLAG",0));
+ DBWriteContactSettingByte(hContact,modname, "Reuse",(BYTE)DBGetContactSettingByte(NULL, modname, "Reuse",0));
+ DBWriteContactSettingByte(hContact, modname, "GiveUpDays", (BYTE)DBGetContactSettingByte(NULL, modname, "GiveUpDays",0));
+ DBWriteContactSettingDword(hContact, modname, "GiveUpDate", (DWORD)DBGetContactSettingDword(NULL, modname, "GiveUpDate",0));
+ DBWriteContactSettingByte(hContact, modname, "ConfirmTimeout", (BYTE)DBGetContactSettingByte(NULL, modname, "ConfirmTimeout",0));
+ }
+ break;
+ case IDC_SETTINGS:
+ if (HIWORD(wParam) == LBN_SELCHANGE)
+ {
+ struct windowInfo *wi = (struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA);
+ int item = SendMessage(GetDlgItem(hwnd, IDC_SETTINGS), LB_GETCURSEL, 0, 0);
+ char temp[5];
+ saveLastSetting(wi->hContact, hwnd);
+ hideAll(hwnd);
+ switch (item)
+ {
+ case 0: // Send If My Status Is...
+ statusModes(wi, 1);
+ break;
+ case 1: // Send If They Change status to
+ statusModes(wi, 0);
+ break;
+ case 3: // Reuse Pounce
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Reuse this message? (0 to use it once)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Times");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "Reuse", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+ case 4: // Give Up delay
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Giveup after.. (0 to not giveup)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Days");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "GiveUpDays", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+ case 5: // confirm window
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Show confirmation window? (0 to not Show)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Seconds to wait before sending");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "ConfirmTimeout", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+
+ case 7: // send a file
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Send a file");
+ ShowWindow(GetDlgItem(hwnd, IDC_BUTTON), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGTEXT), SW_SHOW);
+ break;
+ }
+ DBWriteContactSettingByte(wi->hContact, modname, "LastSetting", (BYTE)item);
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+BOOL CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_INITDIALOG:
+ {
+ HANDLE hContact = (HANDLE)lParam;
+ char msg[1024];
+ TranslateDialogDefault(hwnd);
+ SetWindowLong(hwnd,GWL_USERDATA,(LPARAM)lParam);
+
+ getDefaultMessage(hwnd, IDC_MESSAGE, hContact);
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE)));
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+
+ }
+ return FALSE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDC_MESSAGE:
+ {
+ if (HIWORD(wParam) == EN_CHANGE)
+ {
+ int length;
+ char msg[1024];
+ length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE));
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), length);
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ }
+ }
+ break;
+ case IDC_ADVANCED:
+ // fall through
+ case IDOK:
+ {
+ char *text;
+ HANDLE hContact = (HANDLE)GetWindowLong(hwnd,GWL_USERDATA);
+ int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE))+1;
+ if (length>1)
+ {
+ text = (char*)malloc(length);
+ if (!text) { msg("Couldnt Allocate enough memory",""); break; }
+ GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
+
+ }
+ else DBDeleteContactSetting(hContact, modname, "PounceMsg");
+ } // fall through
+ case IDCANCEL:
+ if (LOWORD(wParam) == IDC_ADVANCED)
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, GetWindowLong(hwnd,GWL_USERDATA));
+ DestroyWindow(hwnd);
+ break;
+ return FALSE;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+BOOL CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg)
+ {
+ case WM_INITDIALOG:
+ {
+ struct windowInfo *wi = (struct windowInfo *)malloc(sizeof(struct windowInfo));
+ char msg[1024];
+ TranslateDialogDefault(hwnd);
+ wi->hContact = 0;
+ wi->SendIfMy = 0;
+ wi->SendWhenThey = 0;
+ SetWindowLong(hwnd,GWL_USERDATA,(LPARAM)wi);
+
+ getDefaultMessage(hwnd, IDC_MESSAGE, wi->hContact);
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE)));
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ populateSettingsList(GetDlgItem(hwnd, IDC_SETTINGS));
+ SendMessage(GetDlgItem(hwnd,IDC_SPIN), UDM_SETRANGE, 0, (LPARAM) MAKELONG ((short) 1024, (short) 0));
+ CheckDlgButton(hwnd, IDC_USEADVANCED, DBGetContactSettingByte(NULL, modname, "UseAdvanced", 0));
+ CheckDlgButton(hwnd, IDC_SHOWDELIVERYMSGS, DBGetContactSettingByte(NULL, modname, "ShowDeliveryMessages", 1));
+ DBWriteContactSettingByte(wi->hContact, modname, "LastSetting", 0);
+ }
+ return FALSE;
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ {
+ char *text;
+ struct windowInfo *wi = (struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA);
+ HANDLE hContact = ((struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA))->hContact;
+ int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE))+1;
+ if (length>1)
+ {
+ text = (char*)malloc(length);
+ if (!text) { msg("Couldnt Allocate enough memory",""); break; }
+ GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
+ DBWriteContactSettingString(hContact, modname, "PounceMsg", text);
+ free(text);
+ }
+ else DBDeleteContactSetting(hContact, modname, "PounceMsg");
+ DBWriteContactSettingByte(NULL, modname, "UseAdvanced", (BYTE)IsDlgButtonChecked(hwnd, IDC_USEADVANCED));
+ DBWriteContactSettingByte(NULL, modname, "ShowDeliveryMessages", (BYTE)IsDlgButtonChecked(hwnd, IDC_SHOWDELIVERYMSGS));
+
+ if (wi->SendIfMy) DestroyWindow(wi->SendIfMy);
+ if (wi->SendWhenThey) DestroyWindow(wi->SendWhenThey);
+ }
+ break;
+ }
+ break;
+ }
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDC_MESSAGE:
+ {
+ if (HIWORD(wParam) == EN_CHANGE)
+ {
+ int length;
+ char msg[1024];
+ length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE));
+ _snprintf(msg, 1024, Translate("The Message (%d Characters)"), length);
+ SetDlgItemText(hwnd, GRP_MSG, msg);
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ }
+ }
+ break;
+ case IDC_SHOWDELIVERYMSGS:
+ case IDC_USEADVANCED:
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_SETTINGS:
+ if (HIWORD(wParam) == LBN_SELCHANGE)
+ {
+ struct windowInfo *wi = (struct windowInfo *)GetWindowLong(hwnd,GWL_USERDATA);
+ int item = SendMessage(GetDlgItem(hwnd, IDC_SETTINGS), LB_GETCURSEL, 0, 0);
+ char temp[5];
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ saveLastSetting(wi->hContact, hwnd);
+ hideAll(hwnd);
+ switch (item)
+ {
+ case 0: // Send If My Status Is...
+ statusModes(wi, 1);
+ break;
+ case 1: // Send If They Change status to
+ statusModes(wi, 0);
+ break;
+ case 3: // Reuse Pounce
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Reuse this message? (0 to use it once)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Times");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "Reuse", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+ case 4: // Give Up delay
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Giveup after.. (0 to not giveup)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Days");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "GiveUpDays", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+ case 5: // confirm window
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Show confirmation window? (0 to not Show)");
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG2), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG2, "Seconds to wait before sending");
+ SetDlgItemText(hwnd, IDC_SETTINGNUMBER, itoa(DBGetContactSettingByte(wi->hContact, modname, "ConfirmTimeout", 0), temp, 10));
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGNUMBER), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_SHOW);
+ break;
+
+ case 7: // send a file
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGMSG), SW_SHOW);
+ SetDlgItemText(hwnd, IDC_SETTINGMSG, "Send a file");
+ ShowWindow(GetDlgItem(hwnd, IDC_BUTTON), SW_SHOW);
+ ShowWindow(GetDlgItem(hwnd, IDC_SETTINGTEXT), SW_SHOW);
+ break;
+ }
+ DBWriteContactSettingByte(wi->hContact, modname, "LastSetting", (BYTE)item);
+ }
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+
+
+BOOL CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ DBVARIANT dbv;
+ struct SendPounceDlgProcStruct *spdps = (struct SendPounceDlgProcStruct *)lParam;
+ if (!spdps) DestroyWindow(hwnd);
+ TranslateDialogDefault(hwnd);
+ spdps->timer = DBGetContactSettingByte(spdps->hContact, modname, "ConfirmTimeout", 0);
+ SetWindowLong(hwnd,GWL_USERDATA,(WPARAM)spdps);
+ if (DBGetContactSetting(spdps->hContact,modname,"PounceMsg",&dbv)) DestroyWindow(hwnd);
+ SetDlgItemText(hwnd,IDC_MESSAGE,dbv.pszVal);
+ DBFreeVariant(&dbv);
+ SetTimer(hwnd,1,1000,NULL);
+ SendMessage(hwnd,WM_TIMER,0,0);
+ }
+ break;
+ case WM_TIMER:
+ {
+ struct SendPounceDlgProcStruct *spdps = (struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA);
+ char message[1024];
+ _snprintf(message,sizeof(message),Translate("Pounce being sent to %s in %d seconds"),CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)spdps->hContact, 0),spdps->timer);
+ SetDlgItemText(hwnd,LBL_CONTACT ,message);
+ spdps->timer--;
+
+ if (spdps->timer == -1)
+ {
+ KillTimer(hwnd,1);
+ SendPounce(spdps->message, ((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA))->hContact);
+ free((char*)((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA))->message);
+ free((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA));
+ DestroyWindow(hwnd);
+ }
+ break;
+ }
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ KillTimer(hwnd,1);
+ SendPounce(((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA))->message, ((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA))->hContact);
+ // fall through
+ case IDCANCEL:
+ KillTimer(hwnd,1);
+ free(((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA))->message);
+ free((struct SendPounceDlgProcStruct *)GetWindowLong(hwnd, GWL_USERDATA));
+ DestroyWindow(hwnd);
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+
+
+BOOL CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ HANDLE hContact = (HANDLE)GetWindowLong(hwnd,GWL_USERDATA);
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ DBVARIANT dbv;
+ SetWindowLong(hwnd,GWL_USERDATA,(WPARAM)lParam);
+ TranslateDialogDefault(hwnd);
+ hContact = (HANDLE)lParam;
+ if (DBGetContactSetting(hContact,modname,"PounceMsg",&dbv)) DestroyWindow(hwnd);
+ SetDlgItemText(hwnd,IDC_MESSAGE,dbv.pszVal);
+ DBFreeVariant(&dbv);
+ }
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ {
+ char text[2048];
+ GetWindowText(GetDlgItem(hwnd,IDOK),text,16);
+ if (!strcmp(text,Translate("Retry")))
+ {
+ GetWindowText(GetDlgItem(hwnd,IDC_MESSAGE),text,2048);
+ SendPounce(text,hContact);
+ }
+ }
+ // fall through
+ case IDCANCEL:
+ DestroyWindow(hwnd);
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+void CreateMessageAcknowlegedWindow(HANDLE hContact, int SentSuccess)
+{
+ HWND hwnd = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_CONFIRMSEND),0,PounceSentDlgProc, (LPARAM)hContact);
+ char msg[256];
+ if (SentSuccess)
+ {
+ _snprintf(msg,256,Translate("Message successfully sent to %s"),CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0) );
+ SetWindowText(GetDlgItem(hwnd,IDOK),"OK");
+ ShowWindow(GetDlgItem(hwnd,IDCANCEL),0);
+ }
+ else
+ {
+ _snprintf(msg,256,Translate("Message failed to send to %s"),CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
+ SetWindowText(GetDlgItem(hwnd,IDOK),"Retry");
+ }
+ SetWindowText(GetDlgItem(hwnd,LBL_CONTACT),msg);
+ SetWindowText(hwnd,modFullname);
+} \ No newline at end of file
diff --git a/plugins/!NotAdopted/BuddyPounce/headers.h b/plugins/!NotAdopted/BuddyPounce/headers.h
new file mode 100644
index 0000000000..ca943de5e7
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/headers.h
@@ -0,0 +1,101 @@
+#ifndef _COMMONHEADERS_H
+#define _COMMONHEADERS_H
+#pragma warning( disable : 4786 ) // limitation in MSVC's debugger.
+//=====================================================
+// Includes
+//=====================================================
+
+
+#include <windows.h>
+#include <commctrl.h>
+#include <stdio.h>
+#include <time.h>
+#include <stddef.h>
+#include <process.h>
+#include <string.h>
+#include "../miranda_src/SDK/Headers_c/newpluginapi.h"
+#include "../miranda_src/SDK/Headers_c/m_clist.h"
+#include "../miranda_src/SDK/Headers_c/m_clui.h"
+#include "../miranda_src/SDK/Headers_c/m_skin.h"
+#include "../miranda_src/SDK/Headers_c/m_langpack.h"
+#include "../miranda_src/SDK/Headers_c/m_protomod.h"
+#include "../miranda_src/SDK/Headers_c/m_database.h"
+#include "../miranda_src/SDK/Headers_c/m_system.h"
+#include "../miranda_src/SDK/Headers_c/m_protocols.h"
+#include "../miranda_src/SDK/Headers_c/m_userinfo.h"
+#include "../miranda_src/SDK/Headers_c/m_options.h"
+#include "../miranda_src/SDK/Headers_c/m_protosvc.h"
+#include "../miranda_src/SDK/Headers_c/m_utils.h"
+#include "../miranda_src/SDK/Headers_c/m_ignore.h"
+#include "../miranda_src/SDK/Headers_c/m_clc.h"
+#include "../miranda_src/SDK/Headers_c/m_history.h"
+//#include "../miranda_src/SDK/Headers_c/win2k.h"
+#include "../miranda_src/SDK/Headers_c/m_popup.h"
+#include "../miranda_src/SDK/Headers_c/m_file.h"
+#include "../miranda_src/SDK/Headers_c/m_uninstaller.h"
+#include "resource.h"
+
+#ifndef NDEBUG
+#define _CRTDBG_MAP_ALLOC
+#include <crtdbg.h>
+#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
+#endif
+//=======================================================
+// Definitions
+//=======================================================
+#define modname "buddypounce"
+#define modFullname "Buddy Pounce"
+#define msg(a,b) MessageBox(0,a,b,MB_OK)
+
+#define SECONDSINADAY 86400
+
+/* flags for the sending and recieving.... */
+#define ANY 1
+#define ONLINE 2
+#define AWAY 4
+#define NA 8
+#define OCCUPIED 16
+#define DND 32
+#define FFC 64
+#define INVISIBLE 128
+#define PHONE 256
+#define LUNCH 512
+
+//=======================================================
+// Variables
+//=======================================================
+PLUGINLINK *pluginLink;
+HINSTANCE hInst;
+
+struct windowInfo {
+ HANDLE hContact;
+ HWND SendIfMy;
+ HWND SendWhenThey;
+};
+
+struct SendPounceDlgProcStruct {
+ HANDLE hContact;
+ int timer;
+ char *message;
+};
+//=======================================================
+// Functions
+//=======================================================
+
+// main.c
+void SendPounce(char* text, HANDLE hContact);
+
+//dialog.c
+BOOL CALLBACK BuddyPounceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+void CreateMessageAcknowlegedWindow(HANDLE hContact, int SentSuccess);
+
+#ifndef NDEBUG
+#include <crtdbg.h>
+#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
+#endif
+#pragma comment(lib,"comctl32.lib")
+
+#endif //_COMMONHEADERS_H \ No newline at end of file
diff --git a/plugins/!NotAdopted/BuddyPounce/icon1.ico b/plugins/!NotAdopted/BuddyPounce/icon1.ico
new file mode 100644
index 0000000000..246d817416
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/icon1.ico
Binary files differ
diff --git a/plugins/!NotAdopted/BuddyPounce/main.c b/plugins/!NotAdopted/BuddyPounce/main.c
new file mode 100644
index 0000000000..15c1e9cb10
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/main.c
@@ -0,0 +1,300 @@
+#include "headers.h"
+
+PLUGININFO pluginInfo={
+ sizeof(PLUGININFO),
+ "Buddy Pounce",
+ PLUGIN_MAKE_VERSION(0,3,2,1),
+ "Allows you to send a message to contacts if they change status and your not there to say hi. Bassically offline messaging for protocols that dont have it.",
+ "Jonathan Gordon",
+ "ICQ 98791178, MSN jonnog@hotmail.com",
+ "© 2004 Jonathan Gordon, jdgordy@gmail.com",
+ "http://jdgordy.tk", // www
+ 0, //not transient
+ 0 //doesn't replace anything built-in
+};
+
+//========================
+// WINAPI DllMain
+//========================
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+//========================
+// MirandaPluginInfo
+//========================
+
+
+__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+//===================
+// MainInit
+//===================
+
+int MainInit(WPARAM wParam,LPARAM lParam)
+{
+ return 0;
+}
+HANDLE hWindowList;
+
+int MsgAck(WPARAM wParam,LPARAM lParam)
+{
+ ACKDATA *ack=(ACKDATA*)lParam;
+
+ if (ack && ack->cbSize==sizeof(ACKDATA)
+ && ack->type==ACKTYPE_MESSAGE
+ && ack->hProcess==(HANDLE)WindowList_Find(hWindowList,ack->hContact))
+ {
+ if (DBGetContactSettingByte(NULL, modname, "ShowDeliveryMessages", 1))
+ CreateMessageAcknowlegedWindow(ack->hContact,ack->result == ACKRESULT_SUCCESS);
+ if (ack->result == ACKRESULT_SUCCESS)
+ {
+ // wrtie it to the DB
+ DBEVENTINFO dbei = { 0 };
+ DBVARIANT dbv;
+ int reuse = DBGetContactSettingByte(ack->hContact,modname, "Reuse", 0);
+ if (!DBGetContactSetting(ack->hContact, modname, "PounceMsg", &dbv) && (dbv.pszVal[0] != '\0'))
+ {
+
+ dbei.cbSize = sizeof(dbei);
+ dbei.eventType = EVENTTYPE_MESSAGE;
+ dbei.flags = DBEF_SENT;
+ dbei.szModule = ack->szModule;
+ dbei.timestamp = time(NULL);
+ dbei.cbBlob = lstrlenA(dbv.pszVal) + 1;
+ dbei.pBlob = (PBYTE) dbv.pszVal;
+ CallService(MS_DB_EVENT_ADD, (WPARAM) ack->hContact, (LPARAM) & dbei);
+ }
+ // check to reuse
+ if (reuse >1)
+ DBWriteContactSettingByte(ack->hContact,modname, "Reuse", (BYTE)(reuse-1));
+ else
+ {
+ DBWriteContactSettingByte(ack->hContact,modname, "Reuse", 0);
+ DBWriteContactSettingString(ack->hContact,modname, "PounceMsg","");
+ }
+ }
+ WindowList_Remove(hWindowList,(HWND)ack->hProcess);
+ }
+ return 0;
+}
+
+int BuddyPounceOptInit(WPARAM wParam,LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp;
+
+ ZeroMemory(&odp,sizeof(odp));
+ odp.cbSize=sizeof(odp);
+ odp.position=0;
+ odp.hInstance=hInst;
+ odp.pszTemplate=MAKEINTRESOURCE(IDD_OPTIONS);
+ odp.pszGroup= "Plugins";
+ odp.pszTitle="Buddy Pounce";
+ odp.pfnDlgProc=BuddyPounceOptionsDlgProc;
+ odp.expertOnlyControls=NULL;
+ CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+
+ return 0;
+}
+
+int statusCheck(int statusFlag, int status)
+{
+ if (statusFlag == ANY || !statusFlag) return 1;
+ switch(status)
+ {
+ case ID_STATUS_OFFLINE:
+ return 0;
+ case ID_STATUS_ONLINE:
+ return (statusFlag & ONLINE);
+ case ID_STATUS_AWAY:
+ return (statusFlag & AWAY);
+ case ID_STATUS_NA:
+ return (statusFlag & NA);
+ case ID_STATUS_OCCUPIED:
+ return (statusFlag & OCCUPIED);
+ case ID_STATUS_DND:
+ return (statusFlag & DND);
+ case ID_STATUS_FREECHAT:
+ return (statusFlag & FFC);
+ case ID_STATUS_INVISIBLE:
+ return (statusFlag & INVISIBLE);
+ case ID_STATUS_OUTTOLUNCH:
+ return (statusFlag & LUNCH);
+ case ID_STATUS_ONTHEPHONE:
+ return (statusFlag & PHONE);
+ }
+ return 0;
+}
+int CheckDate(HANDLE hContact)
+{
+ time_t curtime = time (NULL);
+ if(!DBGetContactSettingByte(hContact,modname,"GiveUpDays",0))
+ return 1;
+ if(DBGetContactSettingByte(hContact,modname,"GiveUpDays",0) && ( abs(DBGetContactSettingDword(hContact,modname,"GiveUpDate",0)) > curtime))
+ return 1;
+ return 0;
+}
+
+void SendPounce(char* text, HANDLE hContact)
+{
+ HANDLE hSendId;
+ if (hSendId = (HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)text))
+ WindowList_Add(hWindowList,(HWND)hSendId,hContact);
+}
+
+int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam)
+{
+ DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
+ int newStatus,oldStatus;
+ DBVARIANT dbv;
+ HANDLE hContact;
+ char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)wParam,0);
+ char* message;
+ if((HANDLE)wParam==NULL || strcmp(cws->szSetting,"Status")) return 0;
+ if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM))
+ {
+ newStatus=cws->value.wVal;
+ oldStatus=DBGetContactSettingWord((HANDLE)wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
+
+ if ( ( newStatus != oldStatus ) && ( (HANDLE)wParam != NULL) && ( newStatus != ID_STATUS_OFFLINE) )
+ {
+ hContact=(HANDLE)wParam;
+ if (!DBGetContactSetting(hContact, modname, "PounceMsg", &dbv) && (dbv.pszVal[0] != '\0'))
+ {
+ // check my status
+ if (statusCheck(DBGetContactSettingWord(hContact, modname, "SendIfMyStatusIsFLAG", 0), CallProtoService(szProto, PS_GETSTATUS,0,0))
+ // check the contacts status
+ && statusCheck(DBGetContactSettingWord(hContact, modname, "SendIfTheirStatusIsFLAG", 0), newStatus) )
+ {
+ // check if we r giving up after x days
+ if (CheckDate(hContact))
+ {
+
+ if (DBGetContactSettingByte(hContact, modname, "ConfirmTimeout", 0))
+ {
+ struct SendPounceDlgProcStruct *spdps = (struct SendPounceDlgProcStruct *)malloc(sizeof(struct SendPounceDlgProcStruct));
+ message = strdup(dbv.pszVal); // will get free()ed in the send confirm window proc
+ spdps->hContact = hContact;
+ spdps->message = message;
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_CONFIRMSEND),0,SendPounceDlgProc, (LPARAM)spdps);
+ // set the confirmation window to send the msg when the timeout is done
+ }
+ else SendPounce(dbv.pszVal, hContact);
+ }
+ }
+ }
+
+ }
+ }
+ DBFreeVariant(&dbv);
+ return 0;
+}
+HANDLE hHookSettingChanged = NULL;
+HANDLE hHookoptsinit = NULL;
+HANDLE hHookAck = NULL;
+
+int BuddyPounceMenuCommand(WPARAM wParam,LPARAM lParam)
+{
+ if (DBGetContactSettingByte(NULL, modname, "UseAdvanced", 0) || DBGetContactSettingByte((HANDLE)wParam, modname, "UseAdvanced", 0))
+ CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, wParam);
+ else CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, wParam);
+ return 0;
+}
+
+int AddSimpleMessage(WPARAM wParam,LPARAM lParam)
+{
+ HANDLE hContact = (HANDLE)wParam;
+ char* message = (char*)lParam;
+ time_t today = time(NULL);
+ DBWriteContactSettingString(hContact, modname, "PounceMsg", message);
+ DBWriteContactSettingWord(hContact, modname, "SendIfMyStatusIsFLAG", (WORD)DBGetContactSettingWord(NULL, modname, "SendIfMyStatusIsFLAG",1));
+ DBWriteContactSettingWord(hContact, modname, "SendIfTheirStatusIsFLAG", (WORD)DBGetContactSettingWord(NULL, modname, "SendIfTheirStatusIsFLAG",1));
+ DBWriteContactSettingByte(hContact, modname, "Reuse", (BYTE)DBGetContactSettingByte(NULL, modname, "Reuse",0));
+ DBWriteContactSettingByte(hContact, modname, "GiveUpDays", (BYTE)DBGetContactSettingByte(NULL, modname, "GiveUpDays",0));
+ DBWriteContactSettingDword(hContact, modname, "GiveUpDate", (DWORD)(DBGetContactSettingByte(hContact, modname, "GiveUpDays",0)*SECONDSINADAY));
+ return 0;
+}
+
+int AddToPounce(WPARAM wParam,LPARAM lParam)
+{
+ HANDLE hContact = (HANDLE)wParam;
+ char* message = (char*)lParam;
+ DBVARIANT dbv;
+ if (!DBGetContactSetting(hContact, modname, "PounceMsg",&dbv))
+ {
+ char* newPounce = (char*)malloc(strlen(dbv.pszVal) + strlen(message) + 1);
+ if (!newPounce) return 1;
+ strcpy(newPounce, dbv.pszVal);
+ strcat(newPounce, message);
+ DBWriteContactSettingString(hContact, modname, "PounceMsg", newPounce);
+ free(newPounce);
+ DBFreeVariant(&dbv);
+ }
+ else AddSimpleMessage((WPARAM)hContact, (LPARAM)message);
+ return 0;
+}
+
+//===========================
+// Load (hook ModulesLoaded)
+//===========================
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ CLISTMENUITEM mi;
+ pluginLink = link;
+ hHookSettingChanged =HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UserOnlineSettingChanged);
+ hHookoptsinit = HookEvent(ME_OPT_INITIALISE,BuddyPounceOptInit);
+ hHookAck = HookEvent(ME_PROTO_ACK,MsgAck);
+ CreateServiceFunction("BuddyPounce/MenuCommand",BuddyPounceMenuCommand);
+ hWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
+
+ /* service funcitons for other devs... */
+ CreateServiceFunction("BuddyPounce/AddSimplePounce",AddSimpleMessage); // add a simple pounce to a contact
+ CreateServiceFunction("BuddyPounce/AddToPounce",AddToPounce); // add to the exsisitng pounce, if there isnt 1 then add a new simple pounce.
+ /* ******************************************************** */
+
+ ZeroMemory(&mi,sizeof(mi));
+ mi.cbSize=sizeof(mi);
+ mi.position=10;
+ mi.flags=0;
+ mi.hIcon= LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
+ mi.pszName="&Buddy Pounce";
+ mi.pszService="BuddyPounce/MenuCommand";
+ mi.pszContactOwner=NULL;
+
+ CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
+
+ { // known modules list
+ DBVARIANT dbv;
+ if (DBGetContactSetting(NULL,"KnownModules","Buddy Pounce", &dbv))
+ DBWriteContactSettingString(NULL,"KnownModules","Buddy Pounce",modname);
+ DBFreeVariant(&dbv);
+ }
+ return 0;
+}
+
+
+int __declspec(dllexport) Unload(void)
+{
+ if (hHookSettingChanged)
+ UnhookEvent(hHookSettingChanged);
+ return 0;
+}
+
+//uninstall support
+int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
+{
+ // Delete Files
+ const char* apszFiles[] = {"buddypounce_readme.txt", 0};
+ PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
+
+ if((ppup->bDoDeleteSettings == TRUE) && (ppup->bIsMirandaRunning == TRUE))
+ {
+ PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)modname, (LPARAM)NULL);
+ }
+ return 0;
+} \ No newline at end of file
diff --git a/plugins/!NotAdopted/BuddyPounce/resource.aps b/plugins/!NotAdopted/BuddyPounce/resource.aps
new file mode 100644
index 0000000000..1701ee4649
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/resource.aps
Binary files differ
diff --git a/plugins/!NotAdopted/BuddyPounce/resource.h b/plugins/!NotAdopted/BuddyPounce/resource.h
new file mode 100644
index 0000000000..dfa9c1bb14
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/resource.h
@@ -0,0 +1,81 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#define IDC_DELETE 5
+#define IDC_DEFAULT 6
+#define IDD_POUNCE 101
+#define IDI_POUNCE 104
+#define IDD_CONFIRMSEND 105
+#define IDD_POUNCE_SIMPLE 108
+#define IDD_STATUSMODES 109
+#define IDD_OPTIONS 110
+#define IDC_MESSAGE 1000
+#define CHK_OFFLINE 1003
+#define CHK_ONLINE 1004
+#define CHK_AWAY 1005
+#define CHK_NA 1006
+#define CHK_OCCUPIED 1007
+#define CHK_DND 1008
+#define CHK_FFC 1009
+#define CHK_PHONE 1010
+#define CHK_LUNCH 1011
+#define CHK_ANYSTATUS 1012
+#define CHK_ONLINE2 1013
+#define CHK_AWAY2 1014
+#define CHK_NA2 1015
+#define CHK_OCCUPIED2 1016
+#define CHK_DND2 1017
+#define CHK_FFC2 1018
+#define CHK_PHONE2 1019
+#define CHK_LUNCH2 1020
+#define CHK_REUSE 1028
+#define IDC_REUSETIMES 1029
+#define CHK_GIVEUP 1030
+#define IDC_GIVEUPDAYS 1031
+#define LBL_CONTACT 1034
+#define CHK_POUNCESETUP 1036
+#define CHK_CONFIRM 1037
+#define IDC_TIMEOUT 1038
+#define GRP_DEFAULT 1040
+#define GRP_MSG 1041
+#define GRP_SENDON 1042
+#define GRP_SENDIF 1043
+#define GRP_SETTINGS 1044
+#define IDC_STATICTIMES 1045
+#define IDC_STATICDAYS 1046
+#define IDC_STATICWAIT 1047
+#define IDC_STATICSECONDS 1048
+#define IDC_SETTINGMSG 1061
+#define IDC_SETTINGNUMBER 1066
+#define IDC_SPIN 1067
+#define IDC_SETTINGTEXT 1068
+#define IDC_BUTTON 1069
+#define IDC_SETTINGS 1075
+#define IDC_CONTACTS 1076
+#define IDC_ADVANCED 1078
+#define IDC_SIMPLE 1080
+#define IDC_CHECK1 1081
+#define IDC_CHECK2 1082
+#define IDC_CHECK3 1083
+#define IDC_CHECK4 1084
+#define IDC_CHECK5 1085
+#define IDC_CHECK6 1086
+#define IDC_CHECK7 1087
+#define IDC_CHECK8 1088
+#define IDC_CHECK9 1089
+#define IDC_CHECK10 1090
+#define IDC_SETTINGMSG2 1095
+#define IDC_USEADVANCED 1096
+#define IDC_SHOWDELIVERYMSGS 1097
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 112
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1098
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/!NotAdopted/BuddyPounce/resource.rc b/plugins/!NotAdopted/BuddyPounce/resource.rc
new file mode 100644
index 0000000000..992f3cb1e3
--- /dev/null
+++ b/plugins/!NotAdopted/BuddyPounce/resource.rc
@@ -0,0 +1,312 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_CONFIRMSEND DIALOG DISCARDABLE 0, 0, 257, 100
+STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "Confirm Pounce send"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Send",IDOK,51,79,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,154,79,50,14
+ LTEXT "Pounce being sent to",LBL_CONTACT,7,7,243,8
+ EDITTEXT IDC_MESSAGE,7,18,243,59,ES_MULTILINE | ES_READONLY |
+ WS_VSCROLL
+END
+
+IDD_POUNCE DIALOG DISCARDABLE 0, 0, 314, 146
+STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "Buddy Pounce"
+FONT 8, "MS Sans Serif"
+BEGIN
+ EDITTEXT IDC_MESSAGE,8,15,161,60,ES_MULTILINE | ES_AUTOVSCROLL |
+ ES_WANTRETURN | WS_VSCROLL
+ DEFPUSHBUTTON "OK",IDOK,72,129,21,14
+ PUSHBUTTON "Cancel",IDCANCEL,106,129,33,14
+ GROUPBOX "The Message:",GRP_MSG,4,4,171,76
+ PUSHBUTTON "Delete Pounce",IDC_DELETE,154,129,58,14
+ PUSHBUTTON "Load default Settings",IDC_DEFAULT,230,129,78,14
+ GROUPBOX "Setting Value",IDC_STATIC,4,83,171,43,WS_DISABLED
+ LTEXT "Setting text...........",IDC_SETTINGMSG,8,92,144,8,NOT
+ WS_VISIBLE | WS_TABSTOP
+ EDITTEXT IDC_SETTINGNUMBER,16,106,42,12,ES_NUMBER | NOT
+ WS_VISIBLE
+ CONTROL "Spin2",IDC_SPIN,"msctls_updown32",UDS_WRAP |
+ UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
+ UDS_ARROWKEYS | UDS_NOTHOUSANDS | NOT WS_VISIBLE |
+ WS_TABSTOP,47,106,11,12
+ EDITTEXT IDC_SETTINGTEXT,16,106,153,12,ES_AUTOHSCROLL | NOT
+ WS_VISIBLE
+ PUSHBUTTON "...",IDC_BUTTON,155,90,14,12,NOT WS_VISIBLE
+ GROUPBOX "Settings",IDC_STATIC,179,35,129,91
+ LISTBOX IDC_SETTINGS,183,46,119,72,LBS_NOINTEGRALHEIGHT |
+ WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+ GROUPBOX "Contact To Send Pounce To",IDC_STATIC,179,4,129,28
+ COMBOBOX IDC_CONTACTS,183,15,119,30,CBS_DROPDOWNLIST | CBS_SORT |
+ WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "<< Simple",IDC_SIMPLE,8,129,50,14
+ LTEXT "",IDC_SETTINGMSG2,65,106,104,8,NOT WS_VISIBLE
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_CONFIRMSEND, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 250
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 93
+ END
+
+ IDD_POUNCE, DIALOG
+ BEGIN
+ LEFTMARGIN, 4
+ RIGHTMARGIN, 308
+ VERTGUIDE, 8
+ VERTGUIDE, 16
+ VERTGUIDE, 169
+ VERTGUIDE, 175
+ VERTGUIDE, 179
+ VERTGUIDE, 183
+ VERTGUIDE, 302
+ BOTTOMMARGIN, 143
+ HORZGUIDE, 4
+ HORZGUIDE, 15
+ HORZGUIDE, 106
+ HORZGUIDE, 118
+ HORZGUIDE, 126
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_POUNCE ICON DISCARDABLE "icon1.ico"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (Australia) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_POUNCE_SIMPLE DIALOG DISCARDABLE 0, 0, 186, 90
+STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "Buddy Pounce"
+FONT 8, "MS Sans Serif"
+BEGIN
+ EDITTEXT IDC_MESSAGE,13,17,158,43,ES_MULTILINE | ES_AUTOHSCROLL |
+ ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
+ DEFPUSHBUTTON "OK",IDOK,7,69,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,68,69,50,14
+ PUSHBUTTON "Advanced >>",IDC_ADVANCED,129,69,50,14
+ GROUPBOX "The Message",GRP_MSG,7,7,172,59
+END
+
+IDD_STATUSMODES DIALOG DISCARDABLE 0, 0, 186, 103
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Dialog"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,7,82,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,129,82,50,14
+ GROUPBOX "Static",GRP_MSG,7,7,172,73
+ CONTROL "Check1",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,17,74,10
+ CONTROL "Check1",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,30,74,10
+ CONTROL "Check1",IDC_CHECK3,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,42,74,10
+ CONTROL "Check1",IDC_CHECK4,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,54,74,10
+ CONTROL "Check1",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,66,74,10
+ CONTROL "Check1",IDC_CHECK6,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,93,17,81,10
+ CONTROL "Check1",IDC_CHECK7,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,93,30,81,10
+ CONTROL "Check1",IDC_CHECK8,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,93,42,81,10
+ CONTROL "Check1",IDC_CHECK9,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,93,54,81,10
+ CONTROL "Check1",IDC_CHECK10,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,93,66,81,10
+END
+
+IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 314, 240
+STYLE WS_CHILD
+FONT 8, "MS Sans Serif"
+BEGIN
+ CONTROL "Use Advanced Dialog",IDC_USEADVANCED,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,13,18,85,10
+ EDITTEXT IDC_MESSAGE,15,73,157,60,ES_MULTILINE | ES_AUTOVSCROLL |
+ ES_WANTRETURN | WS_VSCROLL
+ GROUPBOX "The Message: (Characters: )",GRP_MSG,13,63,165,
+ 76
+ GROUPBOX "Setting Value",IDC_STATIC,13,142,165,43,WS_DISABLED
+ LTEXT "Setting text...........",IDC_SETTINGMSG,15,151,144,8,
+ NOT WS_VISIBLE | WS_TABSTOP
+ EDITTEXT IDC_SETTINGNUMBER,20,164,42,12,ES_NUMBER | NOT
+ WS_VISIBLE
+ CONTROL "Spin2",IDC_SPIN,"msctls_updown32",UDS_WRAP |
+ UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
+ UDS_ARROWKEYS | UDS_NOTHOUSANDS | NOT WS_VISIBLE |
+ WS_TABSTOP,51,164,11,12
+ EDITTEXT IDC_SETTINGTEXT,20,164,152,12,ES_AUTOHSCROLL | NOT
+ WS_VISIBLE
+ PUSHBUTTON "...",IDC_BUTTON,159,148,14,12,NOT WS_VISIBLE
+ GROUPBOX "Settings",IDC_STATIC,183,63,118,122
+ LISTBOX IDC_SETTINGS,187,74,109,103,LBS_NOINTEGRALHEIGHT |
+ WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+ LTEXT "",IDC_SETTINGMSG2,69,164,104,8,NOT WS_VISIBLE
+ GROUPBOX "Default Settings These settings are also used when sending a ""Simple"" pounce",
+ IDC_STATIC,7,51,300,142
+ CONTROL "Show Delivery Messages",IDC_SHOWDELIVERYMSGS,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,13,30,95,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_POUNCE_SIMPLE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 83
+ END
+
+ IDD_STATUSMODES, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ VERTGUIDE, 14
+ VERTGUIDE, 88
+ VERTGUIDE, 93
+ VERTGUIDE, 174
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 96
+ HORZGUIDE, 17
+ HORZGUIDE, 30
+ HORZGUIDE, 42
+ HORZGUIDE, 54
+ HORZGUIDE, 66
+ END
+
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 307
+ VERTGUIDE, 13
+ VERTGUIDE, 172
+ VERTGUIDE, 178
+ VERTGUIDE, 183
+ VERTGUIDE, 187
+ VERTGUIDE, 296
+ VERTGUIDE, 301
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 233
+ HORZGUIDE, 63
+ HORZGUIDE, 73
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (Australia) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+