diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-14 08:19:21 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-14 08:19:21 +0000 |
commit | e179ffc995c96568bfdce46ac73f58d569166f05 (patch) | |
tree | ee2dfd530b75ef4ae06cb7079c923fe7e2fbafa8 /protocols/Yahoo/src/ignore.cpp | |
parent | d722261be7a0cd3aa259aa285aea7f936c0e2f0e (diff) |
Yahoo: folders restructurization
git-svn-id: http://svn.miranda-ng.org/main/trunk@1918 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/ignore.cpp')
-rw-r--r-- | protocols/Yahoo/src/ignore.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/protocols/Yahoo/src/ignore.cpp b/protocols/Yahoo/src/ignore.cpp new file mode 100644 index 0000000000..3a0a6f2cdb --- /dev/null +++ b/protocols/Yahoo/src/ignore.cpp @@ -0,0 +1,66 @@ +/*
+ * $Id$
+ *
+ * myYahoo Miranda Plugin
+ *
+ * Authors: Gennady Feldman (aka Gena01)
+ * Laurent Marechal (aka Peorth)
+ *
+ * This code is under GPL and is based on AIM, MSN and Miranda source code.
+ * I want to thank Robert Rainwater and George Hazan for their code and support
+ * and for answering some of my questions during development of this plugin.
+ */
+#include "yahoo.h"
+#include "ignore.h"
+
+const YList* CYahooProto::GetIgnoreList(void)
+{
+ if (m_id < 1)
+ return NULL;
+
+ return yahoo_get_ignorelist(m_id);
+}
+
+void CYahooProto::IgnoreBuddy(const char *buddy, int ignore)
+{
+ if (m_id < 1)
+ return;
+
+ yahoo_ignore_buddy(m_id, buddy, ignore);
+ //yahoo_get_list(m_id);
+}
+
+
+int CYahooProto::BuddyIgnored(const char *who)
+{
+ const YList *l = GetIgnoreList();
+ while (l != NULL) {
+ struct yahoo_buddy *b = (struct yahoo_buddy *) l->data;
+
+ if (lstrcmpiA(b->id, who) == 0) {
+ //LOG(("User '%s' on our Ignore List. Dropping Message.", who));
+ return 1;
+ }
+ l = l->next;
+ }
+
+ return 0;
+}
+
+void CYahooProto::ext_got_ignore(YList * igns)
+{
+ YList *l = igns;
+
+ LOG(("[ext_yahoo_got_ignore] Got Ignore List"));
+
+ while (l != NULL) {
+ struct yahoo_buddy *b = (struct yahoo_buddy *) l->data;
+
+ YAHOO_DEBUGLOG("[ext_yahoo_got_ignore] Buddy: %s", b->id );
+
+ l = l->next;
+ }
+
+ YAHOO_DEBUGLOG("[ext_yahoo_got_ignore] End Of Ignore List");
+}
+
|