From 0bf13f208abe2713455ba8e2d9ffb752233fcc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 7 Nov 2014 20:36:31 +0000 Subject: Weather: Add support for specifying own UserAgent in INI (requested in #810) git-svn-id: http://svn.miranda-ng.org/main/trunk@10923 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_ini.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/Weather/src/weather_ini.cpp') diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 73456a8a73..59c618382b 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -270,6 +270,8 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) Data->InternalVer = 5; else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.4]")) Data->InternalVer = 6; + else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.5]")) + Data->InternalVer = 7; else { TCHAR str[4096]; @@ -294,6 +296,7 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) Data->UpdateURL3 = ""; Data->UpdateURL4 = ""; Data->Cookie = ""; + Data->UserAgent = ""; Data->IDSearch.SearchURL = ""; Data->IDSearch.NotFoundStr = _T(""); Data->NameSearch.SearchURL = ""; @@ -399,6 +402,7 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) else if ( !_stricmp(ValName, "UPDATE URL3")) wSetData(&Data->UpdateURL3, Value); else if ( !_stricmp(ValName, "UPDATE URL4")) wSetData(&Data->UpdateURL4, Value); else if ( !_stricmp(ValName, "COOKIE")) wSetData(&Data->Cookie, Value); + else if ( !_stricmp(ValName, "USERAGENT")) wSetData(&Data->UserAgent, Value); } else if ( !_stricmp(Group, "ID SEARCH")) { if ( !_stricmp(ValName, "AVAILABLE")) { @@ -507,6 +511,7 @@ void FreeWIData(WIDATA *Data) wfree(&Data->UpdateURL3); wfree(&Data->UpdateURL4); wfree(&Data->Cookie); + wfree(&Data->UserAgent); wfree(&Data->IDSearch.SearchURL); wfree(&Data->IDSearch.NotFoundStr); FreeDataItem(&Data->IDSearch.Name); -- cgit v1.2.3