Mercurial > pidgin.yaz
annotate src/protocols/oscar/bos.c @ 10636:0f5c5e6fb27f
[gaim-migrate @ 12118]
The strftime warnings fiunally got to me, so I made gaim_strftime to work
around it.
Turns out KingAnt had already discovered this solution for oscar.c but left
it #iffed out.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 24 Feb 2005 01:11:17 +0000 |
parents | 92cbf9713795 |
children | 8d74ae785a46 |
rev | line source |
---|---|
3952 | 1 /* |
2 * Family 0x0009 - Basic Oscar Service. | |
3 * | |
5948 | 4 * The functionality of this family has been replaced by SSI. |
3952 | 5 */ |
2086 | 6 |
7 #define FAIM_INTERNAL | |
8 #include <aim.h> | |
9 | |
5927 | 10 #include <string.h> |
11 | |
3952 | 12 /* Subtype 0x0002 - Request BOS rights. */ |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
13 faim_export int aim_bos_reqrights(aim_session_t *sess, aim_conn_t *conn) |
2086 | 14 { |
7282 | 15 return aim_genericreq_n_snacid(sess, conn, 0x0009, 0x0002); |
2086 | 16 } |
17 | |
3952 | 18 /* Subtype 0x0003 - BOS Rights. */ |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
19 static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
2086 | 20 { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
21 aim_rxcallback_t userfunc; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
22 aim_tlvlist_t *tlvlist; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
23 fu16_t maxpermits = 0, maxdenies = 0; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
24 int ret = 0; |
2086 | 25 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
26 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
27 * TLVs follow |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
28 */ |
7167 | 29 tlvlist = aim_tlvlist_read(bs); |
2086 | 30 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
31 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
32 * TLV type 0x0001: Maximum number of buddies on permit list. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
33 */ |
7167 | 34 if (aim_tlv_gettlv(tlvlist, 0x0001, 1)) |
35 maxpermits = aim_tlv_get16(tlvlist, 0x0001, 1); | |
2086 | 36 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
37 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
38 * TLV type 0x0002: Maximum number of buddies on deny list. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
39 */ |
7167 | 40 if (aim_tlv_gettlv(tlvlist, 0x0002, 1)) |
41 maxdenies = aim_tlv_get16(tlvlist, 0x0002, 1); | |
2086 | 42 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
43 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
44 ret = userfunc(sess, rx, maxpermits, maxdenies); |
2086 | 45 |
7167 | 46 aim_tlvlist_free(&tlvlist); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
47 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
48 return ret; |
2086 | 49 } |
50 | |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
51 /* |
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
7282
diff
changeset
|
52 * Subtype 0x0004 - Set group permission mask. |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
53 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
54 * Normally 0x1f (all classes). |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
55 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
56 * The group permission mask allows you to keep users of a certain |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
57 * class or classes from talking to you. The mask should be |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
58 * a bitwise OR of all the user classes you want to see you. |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
59 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
60 */ |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
61 faim_export int aim_bos_setgroupperm(aim_session_t *sess, aim_conn_t *conn, fu32_t mask) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
62 { |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
63 return aim_genericreq_l(sess, conn, 0x0009, 0x0004, &mask); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
64 } |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
65 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
66 /* |
3952 | 67 * Stubtypes 0x0005, 0x0006, 0x0007, and 0x0008 - Modify permit/deny lists. |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
68 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
69 * Changes your visibility depending on changetype: |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
70 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
71 * AIM_VISIBILITYCHANGE_PERMITADD: Lets provided list of names see you |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
72 * AIM_VISIBILITYCHANGE_PERMIDREMOVE: Removes listed names from permit list |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
73 * AIM_VISIBILITYCHANGE_DENYADD: Hides you from provided list of names |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
74 * AIM_VISIBILITYCHANGE_DENYREMOVE: Lets list see you again |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
75 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
76 * list should be a list of |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
77 * screen names in the form "Screen Name One&ScreenNameTwo&" etc. |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
78 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
79 * Equivelents to options in WinAIM: |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
80 * - Allow all users to contact me: Send an AIM_VISIBILITYCHANGE_DENYADD |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
81 * with only your name on it. |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
82 * - Allow only users on my Buddy List: Send an |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
83 * AIM_VISIBILITYCHANGE_PERMITADD with the list the same as your |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
84 * buddy list |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
85 * - Allow only the uesrs below: Send an AIM_VISIBILITYCHANGE_PERMITADD |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
86 * with everyone listed that you want to see you. |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
87 * - Block all users: Send an AIM_VISIBILITYCHANGE_PERMITADD with only |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
88 * yourself in the list |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
89 * - Block the users below: Send an AIM_VISIBILITYCHANGE_DENYADD with |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
90 * the list of users to be blocked |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
91 * |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
92 * XXX ye gods. |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
93 */ |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
94 faim_export int aim_bos_changevisibility(aim_session_t *sess, aim_conn_t *conn, int changetype, const char *denylist) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
95 { |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
96 aim_frame_t *fr; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
97 int packlen = 0; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
98 fu16_t subtype; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
99 char *localcpy = NULL, *tmpptr = NULL; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
100 int i; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
101 int listcount; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
102 aim_snacid_t snacid; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
103 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
104 if (!denylist) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
105 return -EINVAL; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
106 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
107 if (changetype == AIM_VISIBILITYCHANGE_PERMITADD) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
108 subtype = 0x05; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
109 else if (changetype == AIM_VISIBILITYCHANGE_PERMITREMOVE) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
110 subtype = 0x06; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
111 else if (changetype == AIM_VISIBILITYCHANGE_DENYADD) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
112 subtype = 0x07; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
113 else if (changetype == AIM_VISIBILITYCHANGE_DENYREMOVE) |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
114 subtype = 0x08; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
115 else |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
116 return -EINVAL; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
117 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
118 localcpy = strdup(denylist); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
119 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
120 listcount = aimutil_itemcnt(localcpy, '&'); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
121 packlen = aimutil_tokslen(localcpy, 99, '&') + listcount + 9; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
122 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
123 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, packlen))) { |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
124 free(localcpy); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
125 return -ENOMEM; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
126 } |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
127 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
128 snacid = aim_cachesnac(sess, 0x0009, subtype, 0x0000, NULL, 0); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
129 aim_putsnac(&fr->data, 0x0009, subtype, 0x00, snacid); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
130 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
131 for (i = 0; (i < (listcount - 1)) && (i < 99); i++) { |
6322 | 132 tmpptr = aimutil_itemindex(localcpy, i, '&'); |
2703
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
133 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
134 aimbs_put8(&fr->data, strlen(tmpptr)); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
135 aimbs_putraw(&fr->data, tmpptr, strlen(tmpptr)); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
136 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
137 free(tmpptr); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
138 } |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
139 free(localcpy); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
140 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
141 aim_tx_enqueue(sess, fr); |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
142 |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
143 return 0; |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
144 } |
441b84ab7f4e
[gaim-migrate @ 2716]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2672
diff
changeset
|
145 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
146 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
2086 | 147 { |
148 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
149 if (snac->subtype == 0x0003) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
150 return rights(sess, mod, rx, snac, bs); |
2086 | 151 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
152 return 0; |
2086 | 153 } |
154 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
155 faim_internal int bos_modfirst(aim_session_t *sess, aim_module_t *mod) |
2086 | 156 { |
157 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
158 mod->family = 0x0009; |
2672 | 159 mod->version = 0x0001; |
160 mod->toolid = 0x0110; | |
4071 | 161 mod->toolversion = 0x0629; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
162 mod->flags = 0; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
163 strncpy(mod->name, "bos", sizeof(mod->name)); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
164 mod->snachandler = snachandler; |
2086 | 165 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
166 return 0; |
2086 | 167 } |