diff options
author | George Hazan <george.hazan@gmail.com> | 2025-01-23 16:05:50 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-01-23 16:05:50 +0300 |
commit | b24b605821da1f4581d0a66d98f63effbecf46f6 (patch) | |
tree | 57b61828230ac7b7f2dab364a848011f5dc0405a /protocols/Weather/src/weather_data.cpp | |
parent | 4f5e18684ec9518657a035164d04e04e87fca5a0 (diff) |
Weather: first version that works
Diffstat (limited to 'protocols/Weather/src/weather_data.cpp')
-rw-r--r-- | protocols/Weather/src/weather_data.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index 2ee99cda25..88c1572f43 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -30,10 +30,10 @@ saving individual weather data for a weather contact. // hContact = the current contact handle // return value = the string for station ID -void GetStationID(MCONTACT hContact, wchar_t *id, int idlen) +void CWeatherProto::GetStationID(MCONTACT hContact, wchar_t *id, int idlen) { // accessing the database - if (db_get_wstatic(hContact, MODULENAME, "ID", id, idlen)) + if (db_get_wstatic(hContact, m_szModuleName, "ID", id, idlen)) id[0] = 0; } @@ -42,7 +42,7 @@ void GetStationID(MCONTACT hContact, wchar_t *id, int idlen) // hContact = current contact handle // return value = the current weather information in WEATHERINFO struct -WEATHERINFO LoadWeatherInfo(MCONTACT hContact) +WEATHERINFO CWeatherProto::LoadWeatherInfo(MCONTACT hContact) { // obtaining values from the DB // assuming station ID must exist at all time, but others does not have to @@ -51,7 +51,7 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact) winfo.hContact = hContact; GetStationID(hContact, winfo.id, _countof(winfo.id)); - if (db_get_wstatic(hContact, MODULENAME, "Nick", winfo.city, _countof(winfo.city))) + if (db_get_wstatic(hContact, m_szModuleName, "Nick", winfo.city, _countof(winfo.city))) wcsncpy(winfo.city, NODATA, _countof(winfo.city) - 1); if (db_get_wstatic(hContact, WEATHERCONDITION, "Update", winfo.update, _countof(winfo.update))) wcsncpy(winfo.update, NODATA, _countof(winfo.update) - 1); |