summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_conv.cpp
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2019-07-21 19:59:18 +0300
committerdartraiden <wowemuh@gmail.com>2019-07-21 19:59:18 +0300
commitb078dfb78c89aea87cd422eae52694738e473cf3 (patch)
treeca896e82a8a5ce81f80d041f4aee7fdeeb007162 /protocols/Weather/src/weather_conv.cpp
parentee7e29d02e94e969c1154515cd0c408c591a2414 (diff)
Restore "Free for chat" status support (fixes #1963)
Diffstat (limited to 'protocols/Weather/src/weather_conv.cpp')
-rw-r--r--protocols/Weather/src/weather_conv.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/Weather/src/weather_conv.cpp b/protocols/Weather/src/weather_conv.cpp
index 584cb4f1bd..9ce8a16ad3 100644
--- a/protocols/Weather/src/weather_conv.cpp
+++ b/protocols/Weather/src/weather_conv.cpp
@@ -316,8 +316,8 @@ void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str)
// cond = the string for weather condition
// return value = status for the icon (ONLINE, OFFLINE, etc)
-static const wchar_t *statusStr[10] = { L"Fog", L"Snow", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" };
-static const WORD statusValue[10] = { FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
+static const wchar_t *statusStr[10] = { L"Lightning", L"Fog", L"Snow", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" };
+static const WORD statusValue[10] = { LIGHT, FOG, SNOW, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
WORD GetIcon(const wchar_t* cond, WIDATA *Data)
{
@@ -333,6 +333,9 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data)
if (wcsstr(cond, L"sunny") || wcsstr(cond, L"clear") || wcsstr(cond, L"fair"))
return SUNNY;
+ if (wcsstr(cond, L"thunder") || wcsstr(cond, L"t-storm"))
+ return LIGHT;
+
if (wcsstr(cond, L"cloud") || wcsstr(cond, L"overcast"))
return CLOUDY;
@@ -342,7 +345,7 @@ WORD GetIcon(const wchar_t* cond, WIDATA *Data)
if (wcsstr(cond, L"snow") || wcsstr(cond, L"ice") || wcsstr(cond, L"freezing") || wcsstr(cond, L"wintry"))
return SNOW;
- if (wcsstr(cond, L"thunder") || wcsstr(cond, L"t-storm") || wcsstr(cond, L"drizzle") || wcsstr(cond, L"rain"))
+ if (wcsstr(cond, L"drizzle") || wcsstr(cond, L"rain"))
return RAIN;
// set the icon using langpack