blob: 5770a570e19f4f9b27bab093daed5b772a3667df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 "stdafx.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) {
yahoo_buddy *b = (yahoo_buddy *) l->data;
if (mir_strcmpi(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) {
yahoo_buddy *b = (yahoo_buddy *) l->data;
debugLogA("[ext_yahoo_got_ignore] Buddy: %s", b->id);
l = l->next;
}
debugLogA("[ext_yahoo_got_ignore] End Of Ignore List");
}
|