diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-01 13:27:40 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-01 13:27:40 +0000 |
commit | f8525a5432212fd0e6593bb632743832550f3463 (patch) | |
tree | c768303e672337c5e49d7486b30e32f9a68ef395 /plugins/NewsAggregator/Src/Utils.cpp | |
parent | 41872c8fb1e0130a80830b9013e42579ba29593f (diff) |
don't import duplicates
git-svn-id: http://svn.miranda-ng.org/main/trunk@5547 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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 fadaaa99fa..f1ae9dcec7 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -598,8 +598,20 @@ HANDLE GetContactByNick(const TCHAR *nick) 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)
+ if (!lstrcmpi(contactNick, nick))
break;
}
return hContact;
}
+
+HANDLE GetContactByURL(const TCHAR *url)
+{
+ HANDLE hContact = NULL;
+
+ for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
+ if (!lstrcmpi(contactURL, url))
+ break;
+ }
+ return hContact;
+}
\ No newline at end of file |