diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-07 20:36:31 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-07 20:36:31 +0000 |
commit | 0bf13f208abe2713455ba8e2d9ffb752233fcc24 (patch) | |
tree | 1aac80de79699b448f7bc88c5f7b8fb51304ad06 /plugins/Weather/src/weather_ini.cpp | |
parent | 3a3ae2263b70483741017e01340d4898248138d2 (diff) |
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
Diffstat (limited to 'plugins/Weather/src/weather_ini.cpp')
-rw-r--r-- | plugins/Weather/src/weather_ini.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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);
|