diff options
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index d5baafedb5..fadaaa99fa 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -590,4 +590,16 @@ VOID ClearText(TCHAR *&message) }
SysFreeString(bstrHtml);
CoUninitialize();
-}
\ No newline at end of file +}
+
+HANDLE GetContactByNick(const TCHAR *nick)
+{
+ HANDLE hContact = NULL;
+
+ for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
+ if (::lstrcmpi(contactNick, nick) == 0)
+ break;
+ }
+ return hContact;
+}
|