summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-08-01 13:27:40 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-08-01 13:27:40 +0000
commitf8525a5432212fd0e6593bb632743832550f3463 (patch)
treec768303e672337c5e49d7486b30e32f9a68ef395 /plugins/NewsAggregator/Src/Utils.cpp
parent41872c8fb1e0130a80830b9013e42579ba29593f (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.cpp14
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