summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/mDynDNS/changelog.txt34
-rw-r--r--plugins/mDynDNS/dyndns.bmpbin0 -> 12894 bytes
-rw-r--r--plugins/mDynDNS/dyndns.icobin0 -> 2550 bytes
-rw-r--r--plugins/mDynDNS/mDynDNS.cpp844
-rw-r--r--plugins/mDynDNS/mDynDNS.h58
-rw-r--r--plugins/mDynDNS/mDynDNS_9.vcxproj195
-rw-r--r--plugins/mDynDNS/mDynDNS_9.vcxproj.filters52
-rw-r--r--plugins/mDynDNS/m_mDynDNS.h56
-rw-r--r--plugins/mDynDNS/readme.txt13
-rw-r--r--plugins/mDynDNS/resource.h44
-rw-r--r--plugins/mDynDNS/resource.rc138
-rw-r--r--plugins/mDynDNS/version.h38
-rw-r--r--plugins/mDynDNS/version.rc38
13 files changed, 1510 insertions, 0 deletions
diff --git a/plugins/mDynDNS/changelog.txt b/plugins/mDynDNS/changelog.txt
new file mode 100644
index 0000000000..c8cc60a6c9
--- /dev/null
+++ b/plugins/mDynDNS/changelog.txt
@@ -0,0 +1,34 @@
+ToDo:
+
+Done: (with the next version available)
+
+mDynDNS: 0.8.1.2
+*** special thanks to Protogenes for his help and tips ***
++ delay for IP check on Miranda start if last check < 10min (requirement by DynDns)
+! fix memory leak
+! rework for MS_NETLIB_REGISTERUSER (Netlib-Log "mDynDNS HTTP connections" is possible)
++ backmx - Non-supporting clients must send NOCHG. (requirement by DynDns)
++ mx - Non-supporting clients must send NOCHG. (requirement by DynDns)
++ wildcard - Non-supporting clients must send NOCHG. (requirement by DynDns)
++ offline - Non-supporting clients must send nothing. (requirement by DynDns)
++ Store IP in DB (Client must not use a DNS query to check a hostname - requirement by DynDns)
+! fix User-Agent string to new pluginName and version
++ updater support for Miranda addon
+
+mDynDNS: 0.8.1.1
++ added mDynDNS as 'KnownModules' in database
++ updater support for http://merlins-miranda.googlecode.com
+! minor option page changes
+! move option page from 'Network' to 'Services'
++ added UUID for Miranda 0.8
+! convert Project from Dev-C++ IDE to vc2008 (.cpp)
++ SVN added http://merlins-miranda.googlecode.com
+
+http://addons.miranda-im.org/details.php?action=viewfile&id=3157
+mDynDNS: 0.0.1.1
++ Langpack added
++ Source added
+! Some code cleaning
+
+mDynDNS: 0.0.1.0
++ Initial release
diff --git a/plugins/mDynDNS/dyndns.bmp b/plugins/mDynDNS/dyndns.bmp
new file mode 100644
index 0000000000..dcbe86acc0
--- /dev/null
+++ b/plugins/mDynDNS/dyndns.bmp
Binary files differ
diff --git a/plugins/mDynDNS/dyndns.ico b/plugins/mDynDNS/dyndns.ico
new file mode 100644
index 0000000000..b62fd48050
--- /dev/null
+++ b/plugins/mDynDNS/dyndns.ico
Binary files differ
diff --git a/plugins/mDynDNS/mDynDNS.cpp b/plugins/mDynDNS/mDynDNS.cpp
new file mode 100644
index 0000000000..07e7454e40
--- /dev/null
+++ b/plugins/mDynDNS/mDynDNS.cpp
@@ -0,0 +1,844 @@
+/*
+Komentarz
+*/
+#include "mDynDNS.h"
+#include "Windowsx.h"
+
+// Prototypes ///////////////////////////////////////////////////////////////////////////
+
+//Information gathered by Miranda, displayed in the plugin pane of the Option Dialog
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME, // altered here and on file listing, so as not to match original
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESC,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ 0, //not transient
+ MIID_MDYNDNS
+};
+
+HINSTANCE hInst; //!< Global reference to the application
+HANDLE hNetlibUser; //!< Netlib Register User
+HANDLE hKAThread;
+HICON hDynDnsIcon; //!< DynDNS icon
+
+int hLangpack;
+
+BOOL closing = FALSE;
+int delay = 10; //!< requirement by DynDns (Client must not query CheckIP more than once every 10 minutes.)
+
+void DoIPCheck();
+static INT_PTR CALLBACK mdyndns_optsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static INT_PTR CALLBACK DnsPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+static void DnsPopupPreview(HWND hwndDlg);
+unsigned long __stdcall KeepAliveThread(LPVOID param);
+void WakeThread(HANDLE hThread);
+void NetlibInit(void);
+void NetlibClose(void);
+static int SystemPShutdown(WPARAM wParam, LPARAM lParam);
+static int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
+static int mdyndns_options_init(WPARAM wParam, LPARAM lParam);
+
+
+// Functions ////////////////////////////////////////////////////////////////////////////
+
+/** DLL entry point
+* Required to store the instance handle
+*/
+extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ hInst = hinstDLL;
+ return TRUE;
+}
+
+/** Called by Miranda to get the information associated to this plugin.
+* It only returns the PLUGININFO structure, without any test on the version
+* @param mirandaVersion The version of the application calling this function
+*/
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ pluginInfo.cbSize = sizeof(PLUGININFOEX);
+ return &pluginInfo;
+}
+
+static const MUUID interfaces[] = { MIID_MDYNDNS, MIID_LAST };
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+/** Initializes the services provided and the link to those needed
+* Called when the plugin is loaded into Miranda
+*/
+extern "C" int __declspec(dllexport) Load()
+{
+ closing = FALSE;
+
+ // set first delay for IP check on miranda start
+ DWORD dwTime, dwDiff, dwLastTs;
+ dwLastTs = db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_LASTIPCHECK, 0);
+ dwTime = (DWORD)time(0);
+ dwDiff = (dwTime - dwLastTs);
+ if (dwDiff < (DWORD)(delay * 60)) delay = ((delay * 60 - dwDiff + 59) / 60) + delay;
+
+ HookEvent( ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent( ME_OPT_INITIALISE, mdyndns_options_init);
+ //HookEvent( ME_SYSTEM_OKTOEXIT, OkToExit);
+ HookEvent( ME_SYSTEM_PRESHUTDOWN, SystemPShutdown);
+
+ hDynDnsIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_ICON1));
+ //hDynDnsIcon = LoadImage(hInst,MAKEINTRESOURCE(IDI_ICON1),IMAGE_ICON,0,0,LR_DEFAULTSIZE);
+ return 0;
+}
+
+/** Prepare the plugin to stop
+* Called by Miranda when it will exit or when the plugin gets deselected
+*/
+extern "C" int __declspec(dllexport) Unload(void)
+{
+ UnhookEvent(SystemPShutdown);
+ DestroyIcon(hDynDnsIcon);
+
+ return 0;
+}
+
+static int SystemPShutdown(WPARAM wParam, LPARAM lParam)
+{
+ closing = TRUE;
+ UnhookEvent(OnModulesLoaded);
+ UnhookEvent(mdyndns_options_init);
+
+ // close Thread
+ WakeThread(hKAThread);
+ WaitForSingleObject(hKAThread, INFINITE);
+ CloseHandle(hKAThread);
+
+ // Netlib unregister
+ NetlibClose();
+
+ return 0;
+}
+
+unsigned long __stdcall KeepAliveThread(LPVOID param)
+{
+ Thread_Push(0, 0);
+ while(!Miranda_Terminated())
+ {
+ SleepEx(60000*(delay-9), TRUE); //Wait 60sec util check ( + extra sec on mirandastart)
+ if (closing) break;
+ delay = 10;
+ DoIPCheck();
+ if (closing) break;
+ SleepEx(60000*(delay-1), TRUE); //Wait 10 min until next check
+ }
+ Thread_Pop();
+ return 0;
+}
+
+void WINAPI NullAPC (DWORD_PTR dwData) { }
+
+void WakeThread(HANDLE hThread)
+{
+ QueueUserAPC(NullAPC, hThread, 0);
+}
+
+// Netlib
+void NetlibInit(void)
+{
+ NETLIBUSER nlu = {0};
+ nlu.cbSize = sizeof(nlu);
+ nlu.szSettingsModule = (char*)PLUGNAME;
+ nlu.szDescriptiveName = Translate("mDynDNS HTTP connections");
+ nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS; //|NUF_NOHTTPSOPTION;
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+}
+
+void NetlibClose(void)
+{
+ Netlib_CloseHandle(hNetlibUser);
+}
+
+// Plugin
+static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+{
+ // Netlib register
+ NetlibInit();
+
+ // create Thread
+ DWORD tid;
+ hKAThread = CreateThread(0, 0, KeepAliveThread, 0, 0, &tid);
+
+ // install known modules strings to database
+ db_set_s(NULL, "KnownModules", PLUGNAME, PLUGNAME);
+
+ return 0;
+}
+
+static int PluginMenuCommand(WPARAM wParam,LPARAM lParam)
+{
+ return 0;
+}
+// Options Page : Init
+static int mdyndns_options_init(WPARAM wParam, LPARAM lParam)
+{
+ char title[64];
+ OPTIONSDIALOGPAGE odp = { 0 };
+ strncpy(title, PLUGNAME, sizeof(title));
+
+ odp.cbSize = sizeof(odp);
+ odp.position = 1003000;
+ odp.hInstance = hInst;
+ odp.pszGroup = Translate("Services");
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_MDYNDNS);
+ odp.pszTitle = title;
+ odp.pfnDlgProc = mdyndns_optsdlgproc;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
+
+ if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ ZeroMemory(&odp,sizeof(odp));
+ odp.cbSize = sizeof(odp);
+ odp.position = 100000000;
+ odp.hInstance = hInst;
+ odp.pszGroup = Translate("Popups");
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_OPT_POPUPS);
+ odp.pszTitle = title; //PLUGNAME;
+ odp.pfnDlgProc = DnsPopupsDlgProc;
+ odp.flags=ODPF_BOLDGROUPS;
+ //odp.nIDBottomSimpleControl = 0;
+ Options_AddPage(wParam,&odp);
+ }
+
+ return 0;
+}
+
+static INT_PTR CALLBACK mdyndns_optsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ {
+ DBVARIANT dbv;
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_USERNAME, &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_USERNAME, dbv.pszVal);
+ db_free(&dbv);
+ }
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_PASSWORD, &dbv)) {
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
+ SetDlgItemText(hwndDlg, IDC_PASSWORD, dbv.pszVal);
+ db_free(&dbv);
+ }
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_DOMAIN, &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_DOMAIN, dbv.pszVal);
+ db_free(&dbv);
+ }
+ TranslateDialogDefault(hwndDlg);
+ }
+ break;
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam))
+ {
+ case IDC_DOMAIN:
+ case IDC_USERNAME:
+ case IDC_PASSWORD:
+ if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_CREATEACCOUNT:
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)URL_DYNDNS);
+ break;
+ default:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ }
+ break;
+ case WM_NOTIFY:
+ {
+ switch (((LPNMHDR) lParam)->code)
+ {
+ case PSN_APPLY:
+ {
+ char str[128];
+
+ // Write Dyndns username
+ GetDlgItemText(hwndDlg, IDC_USERNAME, str, sizeof(str));
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_USERNAME, str);
+ // Write Dyndns Password
+ GetDlgItemText(hwndDlg, IDC_PASSWORD, str, sizeof(str));
+ CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(str), (LPARAM) str);
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_PASSWORD, str);
+ // Write Domain Alias
+ GetDlgItemText(hwndDlg, IDC_DOMAIN, str, sizeof(str));
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_DOMAIN, str);
+ }
+ break;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK DnsPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg)
+ {
+ case WM_INITDIALOG: {
+
+ BYTE delayMode, colorMode;
+ // general
+ CheckDlgButton(hwndDlg, IDC_ENABLEPOPUP, db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPENAB, TRUE));
+ CheckDlgButton(hwndDlg, IDC_ENABLEUPDATEPOPUP, db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPUPD, TRUE));
+ // color
+ SendDlgItemMessage(hwndDlg, IDC_COLOR_BKG, CPM_SETCOLOUR, 0, db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPBACK, POPUP_DEFAULT_COLORBKG));
+ SendDlgItemMessage(hwndDlg, IDC_COLOR_TXT, CPM_SETCOLOUR, 0, db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPTEXT, POPUP_DEFAULT_COLORTXT));
+ colorMode = db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPCOLM, 0);
+ if (colorMode==1) {
+ CheckDlgButton(hwndDlg, IDC_COLOR_CUSTOM, TRUE);
+ } else {
+ if (colorMode==2) {
+ CheckDlgButton(hwndDlg, IDC_COLOR_OS, TRUE);
+ } else {
+ CheckDlgButton(hwndDlg, IDC_COLOR_POPUP, TRUE);
+ }
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_BKG), IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_TXT), IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ }
+ // delay
+ delayMode = db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELM, 0);
+ if (delayMode==1) {
+ CheckDlgButton(hwndDlg, IDC_DELAY_CUSTOM, TRUE);
+ } else if (delayMode==2) {
+ CheckDlgButton(hwndDlg, IDC_DELAY_PERMANENT, TRUE);
+ } else {
+ CheckDlgButton(hwndDlg, IDC_DELAY_POPUP, TRUE);
+ }
+ SetDlgItemInt(hwndDlg, IDC_DELAY, db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELAY, 4), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), IsDlgButtonChecked(hwndDlg, IDC_DELAY_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ TranslateDialogDefault(hwndDlg);
+ } // end: case WM_INITDIALOG
+ break;
+
+ case WM_COMMAND: {
+ switch (LOWORD(wParam)) {
+ case IDC_ENABLEPOPUP:
+ case IDC_ENABLEUPDATEPOPUP:
+ // color
+ case IDC_COLOR_CUSTOM:
+ case IDC_COLOR_TXT:
+ case IDC_COLOR_BKG:
+ case IDC_COLOR_OS:
+ case IDC_COLOR_POPUP:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_BKG), IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_TXT), IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ // enable the 'apply' button
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ // delay
+ case IDC_DELAY:
+ if (Edit_GetModify(GetDlgItem(hwndDlg, IDC_DELAY))) {
+ // enable the 'apply' button
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ break;
+ case IDC_DELAY_CUSTOM:
+ case IDC_DELAY_PERMANENT:
+ case IDC_DELAY_POPUP:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), IsDlgButtonChecked(hwndDlg, IDC_DELAY_CUSTOM) == BST_CHECKED ? TRUE : FALSE);
+ // enable the 'apply' button
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_PREVIEW: {
+ DnsPopupPreview (hwndDlg);
+ } // end: case IDC_PREVIEW:
+ } //end: switch (LOWORD(wParam))
+ } //end: WM_COMMAND
+ break;
+
+ case WM_NOTIFY: {
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY: {
+ BYTE delayMode, colorMode;
+ // general
+ db_set_b (NULL, PLUGNAME, MDYNDNS_KEY_POPUPENAB, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLEPOPUP));
+ db_set_b (NULL, PLUGNAME, MDYNDNS_KEY_POPUPUPD, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLEUPDATEPOPUP));
+ // color
+ db_set_dw (NULL, PLUGNAME, MDYNDNS_KEY_POPUPBACK, (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLOR_BKG,CPM_GETCOLOUR,0,0));
+ db_set_dw (NULL, PLUGNAME, MDYNDNS_KEY_POPUPTEXT, (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLOR_TXT,CPM_GETCOLOUR,0,0));
+ if (IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM)) {
+ colorMode=1;
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_COLOR_OS)) {
+ colorMode=2;
+ } else {
+ colorMode=0;
+ }
+ db_set_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPCOLM, colorMode);
+ // delay
+ db_set_dw (NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELAY,(DWORD) GetDlgItemInt(hwndDlg,IDC_DELAY, NULL, FALSE));
+ if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_CUSTOM)) {
+ delayMode=1;
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_PERMANENT)) {
+ delayMode=2;
+ } else {
+ delayMode=0;
+ }
+ db_set_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELM, delayMode);
+ } //PSN_APPLY end
+ break;
+ } //switch (((LPNMHDR) lParam)->code): end
+ } //WM_NOTIFY end
+ break;
+ } // switch (msg): end
+ return FALSE;
+}
+
+// Popup
+static void DnsPopupPreview(HWND hwndDlg)
+{
+ POPUPDATA ppd;
+
+ ZeroMemory(&ppd, sizeof(ppd));
+ ppd.lchContact = NULL;
+ ppd.PluginWindowProc = NULL;
+ ppd.PluginData=NULL;
+ strcat(ppd.lpzContactName,PLUGNAME);
+ strcat(ppd.lpzText,Translate("Your IP on dyndns.org account, has been updated."));
+ // icon
+ ppd.lchIcon = hDynDnsIcon;
+ //ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ // color
+ if (IsDlgButtonChecked(hwndDlg, IDC_COLOR_CUSTOM)) {
+ ppd.colorBack = SendDlgItemMessage(hwndDlg,IDC_COLOR_BKG,CPM_GETCOLOUR,0,0);
+ ppd.colorText = SendDlgItemMessage(hwndDlg,IDC_COLOR_TXT,CPM_GETCOLOUR,0,0);
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_COLOR_OS)) {
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ } else {
+ ppd.colorBack = ppd.colorText = 0;
+ }
+
+ if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
+ if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_CUSTOM)) {
+ ppd.iSeconds = (int) GetDlgItemInt(hwndDlg,IDC_DELAY, NULL, FALSE);
+ } else if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_PERMANENT)) {
+ ppd.iSeconds = -1;
+ } else {
+ ppd.iSeconds = 0;
+ }
+ CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ }
+ else if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
+ CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ }
+}
+
+
+static void DnsPopup(BOOL err,char *mesg)
+{
+ POPUPDATA ppd;
+ char *lpzContactName;
+
+ if (!db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPENAB, TRUE)) {
+ return;
+ }
+
+ if (err && !db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPUPD, TRUE)) {
+ return;
+ }
+
+ if ( err == TRUE )
+ lpzContactName = MDYNDNS_ERROR_TITLE;
+ else
+ lpzContactName = PLUGNAME;
+
+ ZeroMemory(&ppd, sizeof(ppd));
+ ppd.lchContact = NULL;
+ ppd.PluginWindowProc = NULL;
+ ppd.PluginData=NULL;
+ lstrcpy(ppd.lpzContactName, lpzContactName);
+ lstrcpy(ppd.lpzText, mesg);
+ // icon
+ ppd.lchIcon = hDynDnsIcon;
+ //ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ // color
+ switch (db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPCOLM, 0)) {
+ case MODE_OWN1:
+ ppd.colorBack = db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPBACK, 0);
+ ppd.colorText = db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPTEXT, 0);
+ break;
+ case MODE_OWN2:
+ ppd.colorBack = GetSysColor(COLOR_BTNFACE);
+ ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
+ break;
+ case MODE_POPUP:
+ default:
+ ppd.colorBack = ppd.colorText = 0;
+ break;
+ }
+
+ if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
+ // delay (Custom delay time in seconds. -1 means "forever", 0 means "default time")
+ switch (db_get_b(NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELM, 0)) {
+ case MODE_OWN1:
+ ppd.iSeconds = db_get_dw(NULL, PLUGNAME, MDYNDNS_KEY_POPUPDELAY, 4);
+ break;
+ case MODE_OWN2:
+ ppd.iSeconds = -1;
+ break;
+ case MODE_POPUP:
+ default:
+ ppd.iSeconds = 0;
+ break;
+ }
+ CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ }
+ else if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
+ CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ }
+}
+
+
+// Error handler
+static int PrintError(int err_num)
+{
+ char *err = "Unknown Error.";
+
+ switch (err_num)
+ {
+ //Failed to register NetLib user
+ case 1:
+ err = "Netlib Error.";
+ break;
+ //Failed to connect with Netlib.
+ case 2:
+ err = "Netlib Connection Error.";
+ break;
+ //Error in parsing server response.
+ case 3:
+ err = "Error in parsing server respose.";
+ break;
+ case 4:
+ err = "Miranda mDynDns plugin has been blocked on server for not following specifications - it won't work anymore :(";
+ break;
+ case 5:
+ err = "The username or password specified in options are incorrect. Please check your account details.";
+ break;
+ case 6:
+ err = "The domain alias specified in options has incorect format. Should be 'yourdomain.dyndns.org'.";
+ break;
+ case 7:
+ err = "The domain alias specified in options does not exist. Please check your account details.";
+ break;
+ case 8:
+ err = "The domain alias specified in options exists, but you are not it's owner.";
+ break;
+ case 9:
+ err = "DNS error encountered.";
+ break;
+ case 10:
+ err = "There is a serious problem with the dyndns.org server";
+ break;
+ case 11:
+ err = "There was a serious problem with updating domain alias to it's previous IP. In order not to get abuse the mDynDns plugin will stop working. To get additional information please refer to the readme.txt.";
+ break;
+ case 12:
+ err = "The specified hostname has been blocked becouse of update abuse. In order not to get situation worse the mDynDns plugin will stop working. To get additional information please refer to the readme.txt.";
+ break;
+ case 13:
+ err = "Due to some errors mDynDNS plugin has been turned off to prevent blocking on server.";
+ break;
+ default:
+ err = "Unknown Error.";
+ break;
+ }
+ err = Translate(err);
+
+ if(ServiceExists( MS_POPUP_ADDPOPUP ))
+ DnsPopup(TRUE, err);
+ else
+ MessageBox(NULL,err,MDYNDNS_ERROR_TITLE,MB_OK);
+ return 1;
+}
+
+// DynDNS stuff
+char *GetHostIP(char *name)
+{
+ DBVARIANT dbv;
+ char *Ip = (char*)malloc(17); //static char Ip[17];
+ // get IP from DB
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_LASTIP, &dbv)) {
+ strcpy(Ip,dbv.pszVal);
+ db_free(&dbv);
+ return Ip;
+ }
+ // get IP from DNS query if no IP store in DB
+ char hostname[25];
+ WSADATA wsaData;
+ struct hostent *pHostEnt;
+ struct sockaddr_in tmpSockAddr;
+ char FAR *pszIp;
+
+ WSAStartup(MAKEWORD(2,0),&wsaData);
+ strcpy(hostname,name);
+ pHostEnt = gethostbyname(hostname);
+ if(!pHostEnt){
+ PrintError(2);
+ strcpy (Ip, (char*)MDYNDNS_ERROR_CODE);
+ return Ip;
+ }
+ memcpy(&tmpSockAddr.sin_addr,pHostEnt->h_addr,pHostEnt->h_length);
+ pszIp = inet_ntoa(tmpSockAddr.sin_addr);
+ if (!pszIp) PrintError(5);
+ else strcpy (Ip, pszIp);
+ WSACleanup();
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_LASTIP, Ip);
+ return Ip;
+}
+
+void Block_plugin(BOOL blok)
+{
+ if(blok == TRUE)
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_BLOCKED, MDYNDNS_BLOCK_CODE);
+ else
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_BLOCKED, MDYNDNS_UNBLOCK_CODE);
+}
+
+void UpdateIP(char *ip_num)
+{
+ DBVARIANT dbv;
+ NETLIBHTTPREQUEST nlhr = {0};
+ NETLIBHTTPREQUEST *nlreply;
+
+ char szUrl[500] = "";
+ int ip1 = 0, ip2 = 0, ip3 = 0, ip4 = 0, count;
+ char username[64] = "";
+ char passwd[64] = "";
+ char domain[128] = "";
+ char str[128] = "";
+ char encd[128] = "";
+ char auth[150] = "";
+ char newip[128] = "";
+ char return_code[256] = "";
+ char *notf = "";
+ char szAgent[100] = "";
+ char szVersion[16];
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_USERNAME, &dbv))
+ {
+ strcpy(username,dbv.pszVal);
+ db_free(&dbv);
+ }
+ else
+ return;
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_PASSWORD, &dbv))
+ {
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal) + 1, (LPARAM) dbv.pszVal);
+ strcpy(passwd,dbv.pszVal);
+ db_free(&dbv);
+ }
+ else
+ return;
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_DOMAIN, &dbv))
+ {
+ strcpy(domain,dbv.pszVal);
+ db_free(&dbv);
+ }
+ else
+ return;
+
+ count = sscanf(ip_num , "%d.%d.%d.%d", &ip1, &ip2, &ip3, &ip4);
+ if (count != 4 || ip1 <= 0 || ip1 > 255 || ip2 < 0 || ip2 > 255 ||
+ ip3 < 0 || ip3 > 255 || ip4 < 0 || ip4 > 255 )
+ return;
+
+ strcat(str, username);
+ strcat(str, ":");
+ strcat(str, passwd);
+
+ mir_base64_encodebuf((PBYTE)str, strlen(str), encd, 128);
+
+ strcat(auth, "Basic ");
+ strcat(auth, encd);
+
+ strcat(szUrl,"http://members.dyndns.org/nic/update?");
+ strcat(szUrl,"hostname=");
+ strcat(szUrl,domain);
+ strcat(szUrl,"&myip=");
+ strcat(szUrl,ip_num);
+ strcat(szUrl,"&wildcard=NOCHG");
+ strcat(szUrl,"&mx=NOCHG");
+ strcat(szUrl,"&backmx=NOCHG");
+
+ strcat(szAgent,"MirandaIM - ");
+ strcat(szAgent,__PLUGIN_NAME);
+ strcat(szAgent," plugin - ");
+ ///strcat(szAgent,CreateVersionStringPluginEx(&pluginInfo, szVersion)); // TODO: fix this
+
+ // initialize the netlib request
+ nlhr.cbSize = sizeof(nlhr);
+ nlhr.requestType = REQUEST_GET;
+ nlhr.flags = NLHRF_DUMPASTEXT;
+ nlhr.szUrl = (char*)szUrl;
+ nlhr.headersCount = 3;
+ nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
+ nlhr.headers[0].szName = "Host";
+ nlhr.headers[0].szValue = "members.dyndns.org";
+ nlhr.headers[1].szName = "Authorization";
+ nlhr.headers[1].szValue = auth; //Basic base-64-authorization
+ nlhr.headers[2].szName = "User-Agent";
+ nlhr.headers[2].szValue = szAgent; //__USER_AGENT_STRING;
+
+ nlreply = (NETLIBHTTPREQUEST *) CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM) hNetlibUser, (LPARAM) & nlhr);
+ if( nlreply )
+ {
+ if( nlreply->resultCode >= 200 && nlreply->resultCode < 300 )
+ {
+ nlreply->pData[nlreply->dataLength] = 0;// make sure its null terminated
+ strcpy(return_code,nlreply->pData);
+ if (strncmp (return_code,"badagent",8) == 0)
+ PrintError(4);
+ if (strncmp (return_code,"badauth",7) == 0)
+ PrintError(5);
+ if (strncmp (return_code,"good",4) == 0)
+ {
+ db_set_s(NULL, PLUGNAME, MDYNDNS_KEY_LASTIP, ip_num);
+ notf = "Your IP on dyndns.org account, has been updated.";
+ notf = Translate(notf) ;
+ DnsPopup(FALSE,notf);
+ }
+ if (strncmp (return_code,"nochg",5) == 0)
+ {
+ PrintError(11);
+ Block_plugin(TRUE);
+ }
+ if (strncmp (return_code,"notfqdn",7) == 0)
+ PrintError(6);
+ if (strncmp (return_code,"nohost",6) == 0)
+ PrintError(7);
+ if (strncmp (return_code,"!yours",6) == 0)
+ PrintError(8);
+ if (strncmp (return_code,"abuse",5) == 0)
+ {
+ PrintError(12);
+ Block_plugin(TRUE);
+ }
+ if (strncmp (return_code,"dnserr",6) == 0)
+ PrintError(9);
+ if (strncmp (return_code,"911",3) == 0)
+ PrintError(10);
+ }
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM) nlreply);
+ }
+ mir_free(nlhr.headers);
+}
+
+char *GetExternIP()
+{
+ if( !hNetlibUser ) {
+ PrintError(1);
+ return 0;
+ }
+ char szAgent[100] = "";
+ char szVersion[16];
+ char *ip_str = (char*)malloc(17);
+ char szUrl[ 500 ] = DYN_DNS_SERVER;
+ int ip1 = 0, ip2 = 0, ip3 = 0, ip4 = 0, count;
+ bool result = FALSE;
+ NETLIBHTTPREQUEST nlhr = {0};
+ NETLIBHTTPREQUEST *nlreply;
+ ZeroMemory(&nlhr, sizeof(nlhr));
+
+ strcat(szAgent,"MirandaIM - ");
+ strcat(szAgent,__PLUGIN_NAME);
+ strcat(szAgent," plugin - ");
+ ///strcat(szAgent,CreateVersionStringPluginEx(&pluginInfo, szVersion)); // TODO: fix this
+
+ // initialize the netlib request
+ nlhr.cbSize = sizeof(nlhr);
+ nlhr.requestType = REQUEST_GET;
+ nlhr.flags = NLHRF_DUMPASTEXT;
+ nlhr.szUrl = (char*)szUrl;
+ nlhr.headersCount = 1;
+ nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount);
+ nlhr.headers[0].szName = "User-Agent";
+ nlhr.headers[0].szValue = szAgent;
+
+ nlreply = (NETLIBHTTPREQUEST *) CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM) hNetlibUser, (LPARAM) &nlhr);
+ if( nlreply && nlreply->resultCode >= 200 && nlreply->resultCode < 300 ) {
+ nlreply->pData[nlreply->dataLength] = 0;// make sure its null terminated
+ count = sscanf(nlreply->pData , RESPONSE_PATTERN, &ip1, &ip2, &ip3, &ip4);
+ if (count != 4 || ip1 <= 0 || ip1 > 255 || ip2 < 0 || ip2 > 255 || ip3 < 0 || ip3 > 255 || ip4 < 0 || ip4 > 255 ){
+ PrintError(3);
+ }
+ else {
+ sprintf(ip_str, "%d.%d.%d.%d", ip1, ip2, ip3, ip4);
+ result = TRUE;
+ }
+ }
+ else {
+ PrintError(2);
+ }
+ db_set_dw(NULL, PLUGNAME, MDYNDNS_KEY_LASTIPCHECK, (DWORD)time(0));
+ mir_free(nlhr.headers);
+ if (!result) free(ip_str);
+ if (nlreply) CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM) nlreply);
+ return result ? ip_str : 0;
+}
+
+void DoIPCheck()
+{
+ DBVARIANT dbv;
+ char blok[3] = "";
+ char *myIP = "";
+ char *myExtIP = "";
+ char *notf = "";
+ char domain[128] = "";
+
+ if (closing == TRUE){
+ return ;
+ }
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_DOMAIN, &dbv)) {
+ strcpy(domain,dbv.pszVal);
+ db_free(&dbv);
+ }
+ else {
+ return ;
+ }
+
+ if (!db_get(NULL, PLUGNAME, MDYNDNS_KEY_BLOCKED, &dbv)) {
+ strcpy(blok,dbv.pszVal);
+ db_free(&dbv);
+ if(blok == MDYNDNS_BLOCK_CODE){
+ PrintError(13);
+ return ;
+ }
+ }
+
+ myIP = GetHostIP(domain);
+ if(myIP && (blok != MDYNDNS_BLOCK_CODE) && (myIP != MDYNDNS_ERROR_CODE)){
+ myExtIP = GetExternIP();
+ if(myExtIP){
+ if(strncmp(myIP,myExtIP,15) == 0 ){
+ ; //Do nothing
+ }
+ else {
+ UpdateIP(myExtIP);
+ }
+ free(myExtIP);
+ }
+ }
+ if(myIP) free(myIP);
+}
+
+
+
diff --git a/plugins/mDynDNS/mDynDNS.h b/plugins/mDynDNS/mDynDNS.h
new file mode 100644
index 0000000000..a3f80f5b17
--- /dev/null
+++ b/plugins/mDynDNS/mDynDNS.h
@@ -0,0 +1,58 @@
+
+// Windows includes
+#include <windows.h>
+
+// Standard includes
+#include <stdio.h>
+#include <commctrl.h>
+#include <process.h>
+#include <time.h>
+
+// Miranda IM SDK includes
+#include <win2k.h>
+#include <newpluginapi.h> // This must be included first
+#include <m_popup.h>
+#include <m_clist.h>
+#include <m_skin.h>
+#include <m_system.h>
+#include <m_netlib.h>
+#include <m_langpack.h>
+#include <m_options.h>
+#include <m_database.h>
+
+// Project resources
+#include "resource.h"
+#include "version.h"
+
+#define MODE_POPUP 0
+#define MODE_OWN1 1
+#define MODE_OWN2 2
+#define POPUP_DEFAULT_COLORBKG 0xFFFFFF //0xDCBDA5
+#define POPUP_DEFAULT_COLORTXT 0x000000
+
+#define URL_DYNDNS "https://www.dyndns.com/account/create.html"
+#define DYN_DNS_SERVER "http://checkip.dyndns.org"
+#define RESPONSE_PATTERN "<html><head><title>Current IP Check</title></head><body>Current IP Address: %d.%d.%d.%d</body></html>"
+#define MDYNDNS_ERROR_TITLE "mDynDns - Error"
+#define MDYNDNS_ERROR_CODE "F"
+#define MDYNDNS_BLOCK_CODE "Yes"
+#define MDYNDNS_UNBLOCK_CODE "No"
+#define MDYNDNS_KEY_USERNAME "Username"
+#define MDYNDNS_KEY_PASSWORD "Password"
+#define MDYNDNS_KEY_DOMAIN "Domain"
+#define MDYNDNS_KEY_POPUPENAB "PopupEnabled"
+#define MDYNDNS_KEY_POPUPUPD "UpdatePopupsEnabled"
+#define MDYNDNS_KEY_POPUPBACK "PopupBack"
+#define MDYNDNS_KEY_POPUPTEXT "PopupText"
+#define MDYNDNS_KEY_POPUPDELAY "PopupDelay"
+#define MDYNDNS_KEY_POPUPDELM "PopupDelayMode"
+#define MDYNDNS_KEY_POPUPCOLM "PopupColorMode"
+#define MDYNDNS_KEY_BLOCKED "Blocked"
+#define MDYNDNS_KEY_UPDATETIME "UpdateTime"
+#define MDYNDNS_KEY_LASTIP "LastIP"
+#define MDYNDNS_KEY_LASTIPCHECK "LastCheckTS"
+
+
+#ifndef MIID_MDYNDNS
+#define MIID_MDYNDNS { 0x91e005c7, 0x8760, 0x479f, { 0xa2, 0xc9, 0x1c, 0x9e, 0x31, 0x7, 0x20, 0x1c } } // {91E005C7-8760-479f-A2C9-1C9E3107201C}
+#endif
diff --git a/plugins/mDynDNS/mDynDNS_9.vcxproj b/plugins/mDynDNS/mDynDNS_9.vcxproj
new file mode 100644
index 0000000000..3366dacd82
--- /dev/null
+++ b/plugins/mDynDNS/mDynDNS_9.vcxproj
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug 2in1|Win32">
+ <Configuration>Debug 2in1</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug 2in1|x64">
+ <Configuration>Debug 2in1</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release 2in1|Win32">
+ <Configuration>Release 2in1</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release 2in1|x64">
+ <Configuration>Release 2in1</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>_mDynDNS</ProjectName>
+ <ProjectGuid>{95014A8F-7652-471B-BB5E-8EB4B8779B42}</ProjectGuid>
+ <RootNamespace>mDynDNS</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>..\..\bin10\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug 2in1|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>..\..\bin10\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>..\..\bin10\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release 2in1|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>..\..\bin10\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="mDynDNS.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="mDynDNS.h" />
+ <ClInclude Include="version.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="dyndns.bmp" />
+ <None Include="dyndns.ico" />
+ <None Include="changelog.txt" />
+ <None Include="readme.txt" />
+ <None Include="resource" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc" />
+ <ResourceCompile Include="version.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/mDynDNS/mDynDNS_9.vcxproj.filters b/plugins/mDynDNS/mDynDNS_9.vcxproj.filters
new file mode 100644
index 0000000000..e2f70e225a
--- /dev/null
+++ b/plugins/mDynDNS/mDynDNS_9.vcxproj.filters
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="mDynDNS.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="mDynDNS.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="dyndns.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="dyndns.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="changelog.txt" />
+ <None Include="readme.txt" />
+ <None Include="resource" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/mDynDNS/m_mDynDNS.h b/plugins/mDynDNS/m_mDynDNS.h
new file mode 100644
index 0000000000..c59b38a98d
--- /dev/null
+++ b/plugins/mDynDNS/m_mDynDNS.h
@@ -0,0 +1,56 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2004 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
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+(c) 2009 by Merlin, ing.u.horn@googlemail.com
+
+*/
+
+#ifndef _M_MDYNDNS_H
+#define _M_MDYNDNS_H
+
+#define MDYNDNS_MODULE "mDynDNS" // db settings module path
+#define MDYNDNS_KEY_DOMAIN "Domain" // db settings Domain Key
+#define MDYNDNS_KEY_LASTIP "LastIP" // db settings IP Key
+
+// SERVICE--------------------------------------------------------
+
+#define MDYNDNS_IPMODE_AUTO 0 // get IP auto mode (best way)
+#define MDYNDNS_IPMODE_IPCHECK 1 // get IP by mDynDNS checkip - safe - 1 check every 10min allowed
+#define MDYNDNS_IPMODE_DNS 2 // get IP by DNS querry - unsafe (IP CAN be wrong in DNS cache)
+
+// obtain the IP
+// wParam = (IPMODE) - above MDYNDNS_IPMODE flag
+// lParam = (char*) - pointer (min 16 bit buffer) that recive the IP (NULL on failure)
+// returns: other than 0 on failure,
+
+#define ME_MDYNDNS_GETIP "mDynDNS/GetIP"
+
+// EVENT ---------------------------------------------------------
+
+// fired when the IP is changed
+// wParam = 0
+// lParam = char* new IP
+// the event CAN pass a NULL pointer in lParam which means that the IP check fail
+
+#define ME_MDYNDNS_IPCHANGED "mDynDNS/IPchanged"
+
+#endif
diff --git a/plugins/mDynDNS/readme.txt b/plugins/mDynDNS/readme.txt
new file mode 100644
index 0000000000..64f2db7952
--- /dev/null
+++ b/plugins/mDynDNS/readme.txt
@@ -0,0 +1,13 @@
+mDynDNS: Description
+This is a plugin for people who has connection with dynamic IP and uses
+Dynamic DNS Host Level Service on http://dyndns.org
+
+DynDNS is a cost free service to bind a Domain (e.g. miranda.dyndns.org)
+to an unstatic IP adress.
+So for example if you want to set up a home server, but your Internet
+Service Provider does not provide you with a permanent IP adress,
+how can possible users make use of your server?
+You can send your users your current IP adress erverytime it changes or you
+can bind your IP adress to a dynamic Domain.
+This plugin submits your current IP adress to the server of the DynDNS service.
+So the server can always synchronize your dyn. Domain to your current IP.
diff --git a/plugins/mDynDNS/resource.h b/plugins/mDynDNS/resource.h
new file mode 100644
index 0000000000..27ce8e8fd7
--- /dev/null
+++ b/plugins/mDynDNS/resource.h
@@ -0,0 +1,44 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+#define IDOK 1
+#define IDCANCEL 2
+#define IDCLOSE 8
+#define IDCONTINUE 11
+#define IDB_DynDNS 103
+#define IDI_ONLINE 104
+#define IDI_OFFLINE 105
+#define IDI_NA 131
+#define IDI_OCCUPIED 159
+#define IDD_OPT_MDYNDNS 301
+#define IDC_USERNAME 302
+#define IDC_PASSWORD 303
+#define IDC_DOMAIN 304
+#define IDC_CREATEACCOUNT 305
+#define IDD_OPT_POPUPS 306
+#define IDC_DELAY_POPUP 307
+#define IDC_DELAY_CUSTOM 308
+#define IDC_DELAY_PERMANENT 309
+#define IDC_DELAY 310
+#define IDC_PREVIEW 313
+#define IDC_ENABLEPOPUP 314
+#define IDC_ENABLEUPDATEPOPUP 315
+#define IDC_DynDNS 316
+#define IDC_COLOR_CUSTOM 321
+#define IDC_COLOR_BKG 322
+#define IDC_COLOR_TXT 323
+#define IDC_COLOR_OS 324
+#define IDC_COLOR_POPUP 325
+#define IDI_ICON1 1000
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 106
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1003
+#define _APS_NEXT_SYMED_VALUE 111
+#endif
+#endif
diff --git a/plugins/mDynDNS/resource.rc b/plugins/mDynDNS/resource.rc
new file mode 100644
index 0000000000..7b1253f7f2
--- /dev/null
+++ b/plugins/mDynDNS/resource.rc
@@ -0,0 +1,138 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Deutsch (Deutschland) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPT_MDYNDNS DIALOGEX 0, 0, 280, 240
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ GROUPBOX "DynDns",IDC_STATIC,22,25,235,143
+ RTEXT "Username:",IDC_STATIC,40,55,70,8
+ RTEXT "Password:",IDC_STATIC,40,80,70,8
+ RTEXT "Domain alias:",IDC_STATIC,40,105,70,10
+ EDITTEXT IDC_USERNAME,120,50,100,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_PASSWORD,120,75,100,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_DOMAIN,120,100,100,14,ES_AUTOHSCROLL
+ CONTROL "Register new account on dyndns.org",IDC_CREATEACCOUNT,
+ "Hyperlink",WS_GROUP | 0x1,30,135,219,10
+ CONTROL 103,IDC_DynDNS,"Static",SS_BITMAP,26,20,95,18,WS_EX_TRANSPARENT
+END
+
+IDD_OPT_POPUPS DIALOGEX 0, 0, 313, 187
+STYLE DS_SETFONT | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "General Options",IDC_STATIC,5,4,301,40
+ CONTROL "Enable error popups",IDC_ENABLEPOPUP,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,13,16,267,10
+ CONTROL "Enable updating notification",IDC_ENABLEUPDATEPOPUP,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,29,267,10
+ GROUPBOX "Delay",IDC_STATIC,159,47,147,69
+ CONTROL "&Custom",IDC_DELAY_CUSTOM,"Button",BS_AUTORADIOBUTTON,167,66,87,10
+ CONTROL "&From Popup plugin",IDC_DELAY_POPUP,"Button",BS_AUTORADIOBUTTON,167,96,131,10
+ CONTROL "P&ermanent",IDC_DELAY_PERMANENT,"Button",BS_AUTORADIOBUTTON,167,81,131,10
+ EDITTEXT IDC_DELAY,268,64,21,12,ES_AUTOHSCROLL | ES_NUMBER
+ GROUPBOX "Colors",IDC_STATIC,5,47,147,69
+ LTEXT "Back Color",IDC_STATIC,60,54,39,8
+ LTEXT "Text Color",IDC_STATIC,104,54,39,8
+ CONTROL "",IDC_COLOR_BKG,"ColourPicker",WS_TABSTOP,59,64,39,12
+ CONTROL "",IDC_COLOR_TXT,"ColourPicker",WS_TABSTOP,103,64,39,12
+ CONTROL "Use",IDC_COLOR_CUSTOM,"Button",BS_AUTORADIOBUTTON,13,66,43,10
+ CONTROL "Use default colors",IDC_COLOR_POPUP,"Button",BS_AUTORADIOBUTTON,13,96,131,10
+ CONTROL "&Use Windows colors",IDC_COLOR_OS,"Button",BS_AUTORADIOBUTTON,13,81,131,10
+ PUSHBUTTON "Preview",IDC_PREVIEW,209,166,50,14
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_DynDNS BITMAP "dyndns.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPT_POPUPS, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 306
+ VERTGUIDE, 13
+ VERTGUIDE, 167
+ BOTTOMMARGIN, 180
+ HORZGUIDE, 4
+ HORZGUIDE, 47
+ HORZGUIDE, 76
+ HORZGUIDE, 106
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "dyndns.ico"
+#endif // Deutsch (Deutschland) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/plugins/mDynDNS/version.h b/plugins/mDynDNS/version.h
new file mode 100644
index 0000000000..5e544df596
--- /dev/null
+++ b/plugins/mDynDNS/version.h
@@ -0,0 +1,38 @@
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 8
+#define __RELEASE_NUM 1
+#define __BUILD_NUM 2
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+#define __STRINGIFY(x) #x
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
+
+#define __USER_AGENT_STRING "MirandaIM - mDynDns plugin - "__MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+
+#define __FILENAME "mDynDNS.dll"
+#define __DESC "Alows user to update his IP on DynDNS server."
+#define __AUTHOR "Kirsen, Merlin"
+#define __AUTHOREMAIL "ing.u.horn@googlemail.com"
+#define __COPYRIGHT "© 2006 Kirsen, © 2009 Merlin"
+#define __AUTHORWEB "http://code.google.com/p/merlins-miranda"
+
+#define PLUGNAME "mDynDNS"
+#ifdef _UNICODE
+#define __PLUGIN_NAME PLUGNAME" (Unicode)"
+#define __FLVersionURL "http://addons.miranda-im.org/details.php?action=viewfile&id=4075"
+#define __FLVersionPrefix "<span class=\"fileNameHeader\">mDynDNS (Unicode) "
+#define __FLUpdateURL "http://addons.miranda-im.org/feed.php?dlfile=4075"
+#define __BetaUpdateURL "http://merlins-miranda.googlecode.com/files/mDynDNSW.zip"
+#else
+#define __PLUGIN_NAME PLUGNAME" (2in1)"
+#define __FLVersionURL "http://addons.miranda-im.org/details.php?action=viewfile&id=4075"
+#define __FLVersionPrefix "<span class=\"fileNameHeader\">mDynDNS (2in1) "
+#define __FLUpdateURL "http://addons.miranda-im.org/feed.php?dlfile=4075"
+#define __BetaUpdateURL "http://merlins-miranda.googlecode.com/files/mDynDNS.zip"
+#endif
+
+#define __BetaVersionURL "http://merlins-miranda.googlecode.com/svn/trunk/miranda/plugins/mDynDNS/changelog.txt"
+#define __BetaVersionPrefix "mDynDNS: "
+#define __BetaChangelogURL "http://merlins-miranda.googlecode.com/svn/trunk/miranda/plugins/mDynDNS/changelog.txt"
+
diff --git a/plugins/mDynDNS/version.rc b/plugins/mDynDNS/version.rc
new file mode 100644
index 0000000000..e7a59d0e2b
--- /dev/null
+++ b/plugins/mDynDNS/version.rc
@@ -0,0 +1,38 @@
+#include <windows.h> // include for version info constants
+#include "version.h"
+
+//
+// TO CHANGE VERSION INFORMATION, EDIT PROJECT OPTIONS...
+//
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", ""
+ VALUE "FileVersion", __FILEVERSION_STRING_DOTS
+ VALUE "FileDescription", __DESC
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
+