diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-29 21:00:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-29 21:00:37 +0300 |
commit | f5c0b6951727dacee2fce60421cb23f7dd5e3adc (patch) | |
tree | 42f399ba4cd96ad51da4e1394db240de9aa4b5b0 | |
parent | 20592a568e326ea4211b39779c73f6612adef395 (diff) |
code cleaning
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 7958603b6a..5903d50db5 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -380,28 +380,26 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact) return sztemp;
}
-void _DBWriteTime(SYSTEMTIME *st, MCONTACT hcontact)
-{
- g_plugin.setWord(hcontact, "Day", st->wDay);
- g_plugin.setWord(hcontact, "Month", st->wMonth);
- g_plugin.setWord(hcontact, "Year", st->wYear);
- g_plugin.setWord(hcontact, "Hours", st->wHour);
- g_plugin.setWord(hcontact, "Minutes", st->wMinute);
- g_plugin.setWord(hcontact, "Seconds", st->wSecond);
- g_plugin.setWord(hcontact, "WeekDay", st->wDayOfWeek);
-}
-
void DBWriteTimeTS(DWORD t, MCONTACT hcontact)
{
- SYSTEMTIME st;
- FILETIME ft;
ULONGLONG ll = UInt32x32To64(TimeZone_ToLocal(t), 10000000) + NUM100NANOSEC;
+
+ FILETIME ft;
ft.dwLowDateTime = (DWORD)ll;
ft.dwHighDateTime = (DWORD)(ll >> 32);
+
+ SYSTEMTIME st;
FileTimeToSystemTime(&ft, &st);
g_plugin.setDword(hcontact, "seenTS", t);
- _DBWriteTime(&st, hcontact);
+ g_plugin.setWord(hcontact, "Day", st.wDay);
+ g_plugin.setWord(hcontact, "Month", st.wMonth);
+ g_plugin.setWord(hcontact, "Year", st.wYear);
+ g_plugin.setWord(hcontact, "Hours", st.wHour);
+ g_plugin.setWord(hcontact, "Minutes", st.wMinute);
+ g_plugin.setWord(hcontact, "Seconds", st.wSecond);
+ g_plugin.setWord(hcontact, "WeekDay", st.wDayOfWeek);
}
+
void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword)
{
WORD temp;
@@ -571,6 +569,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) else
prevStatus |= 0x8000;
}
+
if ((cws->value.wVal | 0x8000) <= ID_STATUS_OFFLINE) {
// avoid repeating the offline status
if ((prevStatus | 0x8000) <= ID_STATUS_OFFLINE)
|