Mercurial > pidgin.yaz
annotate src/protocols/napster/napster.c @ 9308:b3bda982996b
[gaim-migrate @ 10116]
Yikes.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 19 Jun 2004 04:57:43 +0000 |
parents | 7a8aa87164ae |
children | 670daf18649b |
rev | line source |
---|---|
2086 | 1 /* |
2 * gaim - Napster Protocol Plugin | |
3 * | |
3322 | 4 * Copyright (C) 2000-2001, Rob Flynn <rob@marko.net> |
7084
0909ebf6fb28
[gaim-migrate @ 7649]
Christian Hammond <chipx86@chipx86.com>
parents:
7062
diff
changeset
|
5 * |
2086 | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 */ | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
20 #include "internal.h" |
2086 | 21 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
22 #include "account.h" |
5638
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
23 #include "accountopt.h" |
9030 | 24 #include "blist.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
25 #include "conversation.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
26 #include "debug.h" |
2086 | 27 #include "multi.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
28 #include "notify.h" |
2086 | 29 #include "prpl.h" |
30 #include "proxy.h" | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
31 #include "util.h" |
3630 | 32 |
3322 | 33 #define NAP_SERVER "64.124.41.187" |
34 #define NAP_PORT 8888 | |
35 | |
5604 | 36 #define NAPSTER_CONNECT_STEPS 2 |
37 | |
2086 | 38 GSList *nap_connections = NULL; |
39 | |
40 struct nap_data { | |
41 int fd; | |
42 gchar *email; | |
43 }; | |
44 | |
5679 | 45 static GaimConversation *nap_find_chat(GaimConnection *gc, const char *name) |
2086 | 46 { |
5402 | 47 GSList *bcs = gc->buddy_chats; |
2086 | 48 |
5402 | 49 while (bcs) { |
5679 | 50 GaimConversation *b = bcs->data; |
5402 | 51 if (!gaim_utf8_strcasecmp(b->name, name)) |
5388 | 52 return b; |
5402 | 53 bcs = bcs->next; |
5388 | 54 } |
55 | |
56 return NULL; | |
57 } | |
58 | |
5604 | 59 static void nap_write_packet(GaimConnection *gc, unsigned short command, const char *format, ...) |
5388 | 60 { |
61 struct nap_data *ndata = (struct nap_data *)gc->proto_data; | |
62 va_list ap; | |
63 gchar *message; | |
64 unsigned short size; | |
65 | |
66 va_start(ap, format); | |
67 message = g_strdup_vprintf(format, ap); | |
68 va_end(ap); | |
69 | |
70 size = strlen(message); | |
71 gaim_debug(GAIM_DEBUG_MISC, "napster", "S %3hd: %s\n", command, message); | |
72 | |
73 write(ndata->fd, &size, 2); | |
74 write(ndata->fd, &command, 2); | |
75 write(ndata->fd, message, size); | |
76 | |
77 g_free(message); | |
78 } | |
79 | |
5604 | 80 static int nap_do_irc_style(GaimConnection *gc, const char *message, const char *name) |
5388 | 81 { |
82 gchar **res; | |
83 | |
84 gaim_debug(GAIM_DEBUG_MISC, "napster", "C %s\n", message); | |
85 | |
86 res = g_strsplit(message, " ", 2); | |
87 | |
8386 | 88 if (!g_ascii_strcasecmp(res[0], "/ME")) { /* MSG_CLIENT_PUBLIC */ |
5402 | 89 nap_write_packet(gc, 824, "%s \"%s\"", name, res[1]); |
5388 | 90 |
8386 | 91 } else if (!g_ascii_strcasecmp(res[0], "/MSG")) { /* MSG_CLIENT_PUBLIC */ |
5388 | 92 nap_write_packet(gc, 205, "%s", res[1]); |
4359
5fb47ec9bfe4
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4349
diff
changeset
|
93 |
8386 | 94 } else if (!g_ascii_strcasecmp(res[0], "/JOIN")) { /* join chatroom MSG_CLIENT_JOIN */ |
5388 | 95 if (!res[1]) { |
96 g_strfreev(res); | |
97 return 1; | |
98 } | |
99 if (res[1][0] != '#') | |
100 nap_write_packet(gc, 400, "#%s", res[1]); | |
101 else | |
102 nap_write_packet(gc, 400, "%s", res[1]); | |
103 | |
8386 | 104 } else if (!g_ascii_strcasecmp(res[0], "/PART")) { /* partchatroom MSG_CLIENT_PART */ |
5402 | 105 nap_write_packet(gc, 401, "%s", res[1] ? res[1] : name); |
5388 | 106 |
8386 | 107 } else if (!g_ascii_strcasecmp(res[0], "/TOPIC")) { /* set topic MSG_SERVER_TOPIC */ |
5402 | 108 nap_write_packet(gc, 410, "%s", res[1] ? res[1] : name); |
5388 | 109 |
8386 | 110 } else if (!g_ascii_strcasecmp(res[0], "/WHOIS")) { /* whois request MSG_CLIENT_WHOIS */ |
5388 | 111 nap_write_packet(gc, 603, "%s", res[1]); |
112 | |
8386 | 113 } else if (!g_ascii_strcasecmp(res[0], "/PING")) { /* send ping MSG_CLIENT_PING */ |
5388 | 114 nap_write_packet(gc, 751, "%s", res[1]); |
115 | |
8386 | 116 } else if (!g_ascii_strcasecmp(res[0], "/KICK")) { /* kick asswipe MSG_CLIENT_KICK */ |
5388 | 117 nap_write_packet(gc, 829, "%s", res[1]); |
118 | |
119 } else { | |
120 g_strfreev(res); | |
121 return 1; | |
122 } | |
123 | |
124 g_strfreev(res); | |
125 return 0; | |
126 } | |
127 | |
128 /* 205 - MSG_CLIENT_PRIVMSG */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
129 static int nap_send_im(GaimConnection *gc, const char *who, const char *message, GaimConvImFlags flags) |
5388 | 130 { |
131 | |
132 if ((strlen(message) < 2) || (message[0] != '/' ) || (message[1] == '/')) { | |
133 /* Actually send a chat message */ | |
134 nap_write_packet(gc, 205, "%s %s", who, message); | |
135 } else { | |
136 /* user typed an IRC-style command */ | |
137 nap_do_irc_style(gc, message, who); | |
2086 | 138 } |
139 | |
5388 | 140 return 1; |
141 } | |
142 | |
143 /* 207 - MSG_CLIENT_ADD_HOTLIST */ | |
9285 | 144 static void nap_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) |
5388 | 145 { |
9285 | 146 nap_write_packet(gc, 207, "%s", buddy->name); |
5388 | 147 } |
148 | |
149 /* 208 - MSG_CLIENT_ADD_HOTLIST_SEQ */ | |
9285 | 150 static void nap_add_buddies(GaimConnection *gc, GList *buddies, GList *groups) |
5388 | 151 { |
152 while (buddies) { | |
9285 | 153 GaimBuddy *buddy = buddies->data; |
154 nap_write_packet(gc, 208, "%s", buddy->name); | |
155 buddies = buddies->next; | |
5388 | 156 } |
157 } | |
158 | |
159 /* 303 - MSG_CLIENT_REMOVE_HOTLIST */ | |
9285 | 160 static void nap_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) |
5388 | 161 { |
9285 | 162 nap_write_packet(gc, 303, "%s", buddy->name); |
5388 | 163 } |
164 | |
165 /* 400 - MSG_CLIENT_JOIN */ | |
5604 | 166 static void nap_join_chat(GaimConnection *gc, GHashTable *data) |
5388 | 167 { |
168 char *name; | |
169 | |
170 if (!data) | |
171 return; | |
172 | |
173 name = g_hash_table_lookup(data, "group"); | |
174 | |
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
8713
diff
changeset
|
175 /* Make sure the name has a # preceding it */ |
5388 | 176 if (name[0] != '#') |
177 nap_write_packet(gc, 400, "#%s", name); | |
178 else | |
179 nap_write_packet(gc, 400, "%s", name); | |
180 } | |
181 | |
182 /* 401 - MSG_CLIENT_PART */ | |
5604 | 183 static void nap_chat_leave(GaimConnection *gc, int id) |
5388 | 184 { |
5679 | 185 GaimConversation *c = gaim_find_chat(gc, id); |
5388 | 186 |
5402 | 187 if (!c) |
5388 | 188 return; |
189 | |
5402 | 190 nap_write_packet(gc, 401, "%s", c->name); |
5388 | 191 } |
192 | |
193 /* 402 - MSG_CLIENT_PUBLIC */ | |
6059 | 194 static int nap_chat_send(GaimConnection *gc, int id, const char *message) |
5388 | 195 { |
5679 | 196 GaimConversation *c = gaim_find_chat(gc, id); |
5388 | 197 |
5402 | 198 if (!c) |
5388 | 199 return -EINVAL; |
200 | |
201 if ((strlen(message) < 2) || (message[0] != '/' ) || (message[1] == '/')) { | |
202 /* Actually send a chat message */ | |
5402 | 203 nap_write_packet(gc, 402, "%s %s", c->name, message); |
5388 | 204 } else { |
205 /* user typed an IRC-style command */ | |
5402 | 206 nap_do_irc_style(gc, message, c->name); |
5388 | 207 } |
208 | |
209 return 0; | |
210 } | |
211 | |
212 /* 603 - MSG_CLIENT_WHOIS */ | |
5604 | 213 static void nap_get_info(GaimConnection *gc, const char *who) |
5388 | 214 { |
215 nap_write_packet(gc, 603, "%s", who); | |
2086 | 216 } |
217 | |
2090
b66aca8e8dce
[gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
218 static void nap_callback(gpointer data, gint source, GaimInputCondition condition) |
2086 | 219 { |
5604 | 220 GaimConnection *gc = data; |
2086 | 221 struct nap_data *ndata = gc->proto_data; |
5679 | 222 GaimConversation *c; |
5402 | 223 gchar *buf, *buf2, *buf3, **res; |
2086 | 224 unsigned short header[2]; |
225 int len; | |
226 int command; | |
2220
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
227 int i; |
2086 | 228 |
5388 | 229 if (read(source, (void*)header, 4) != 4) { |
5604 | 230 gaim_connection_error(gc, _("Unable to read header from server")); |
2220
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
231 return; |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
232 } |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
233 |
2086 | 234 len = header[0]; |
235 command = header[1]; | |
5388 | 236 buf = (gchar *)g_malloc((len + 1) * sizeof(gchar)); |
237 buf[len] = '\0'; | |
2086 | 238 |
2220
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
239 i = 0; |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
240 do { |
5388 | 241 int tmp = read(source, buf + i, len - i); |
2220
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
242 if (tmp <= 0) { |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
243 g_free(buf); |
9040 | 244 buf = g_strdup_printf(_("Unable to read message from server: %s. Command is %hd, length is %hd."), strerror(errno), len, command); |
5604 | 245 gaim_connection_error(gc, buf); |
5388 | 246 g_free(buf); |
2220
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
247 return; |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
248 } |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
249 i += tmp; |
8b7ba25a7ece
[gaim-migrate @ 2230]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2205
diff
changeset
|
250 } while (i != len); |
2086 | 251 |
5388 | 252 gaim_debug(GAIM_DEBUG_MISC, "napster", "R %3hd: %s\n", command, buf); |
2086 | 253 |
5388 | 254 switch (command) { |
255 case 000: /* MSG_SERVER_ERROR */ | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
256 gaim_notify_error(gc, NULL, buf, NULL); |
5388 | 257 gaim_input_remove(gc->inpa); |
258 gc->inpa = 0; | |
2086 | 259 close(source); |
5604 | 260 gaim_connection_destroy(gc); |
5388 | 261 break; |
2086 | 262 |
5388 | 263 case 003: /* MSG_SERVER_EMAIL */ |
264 gaim_debug(GAIM_DEBUG_MISC, "napster", "Registered with e-mail address: %s\n", buf); | |
2086 | 265 ndata->email = g_strdup(buf); |
266 | |
267 /* Our signon is complete */ | |
5604 | 268 gaim_connection_set_state(gc, GAIM_CONNECTED); |
2086 | 269 serv_finish_login(gc); |
270 | |
5388 | 271 break; |
272 | |
273 case 201: /* MSG_SERVER_SEARCH_RESULT */ | |
274 res = g_strsplit(buf, " ", 0); | |
275 serv_got_update(gc, res[0], 1, 0, 0, 0, 0); | |
276 g_strfreev(res); | |
277 break; | |
278 | |
279 case 202: /* MSG_SERVER_SEARCH_END */ | |
280 serv_got_update(gc, buf, 0, 0, 0, 0, 0); | |
281 break; | |
282 | |
283 case 205: /* MSG_CLIENT_PRIVMSG */ | |
284 res = g_strsplit(buf, " ", 2); | |
8495 | 285 buf2 = gaim_escape_html(res[1]); |
286 serv_got_im(gc, res[0], buf2, 0, time(NULL)); | |
287 g_free(buf2); | |
5388 | 288 g_strfreev(res); |
289 break; | |
290 | |
291 case 209: /* MSG_SERVER_USER_SIGNON */ | |
292 /* USERNAME SPEED */ | |
293 res = g_strsplit(buf, " ", 2); | |
294 serv_got_update(gc, res[0], 1, 0, 0, 0, 0); | |
295 g_strfreev(res); | |
296 break; | |
297 | |
298 case 210: /* MSG_SERVER_USER_SIGNOFF */ | |
299 /* USERNAME SPEED */ | |
300 res = g_strsplit(buf, " ", 2); | |
301 serv_got_update(gc, res[0], 0, 0, 0, 0, 0); | |
302 g_strfreev(res); | |
303 break; | |
304 | |
305 case 214: /* MSG_SERVER_STATS */ | |
306 res = g_strsplit(buf, " ", 3); | |
307 buf2 = g_strdup_printf(_("users: %s, files: %s, size: %sGB"), res[0], res[1], res[2]); | |
6982 | 308 serv_got_im(gc, "server", buf2, 0, time(NULL)); |
5388 | 309 g_free(buf2); |
310 g_strfreev(res); | |
311 break; | |
312 | |
313 case 301: /* MSG_SERVER_HOTLIST_ACK */ | |
314 /* Our buddy was added successfully */ | |
315 break; | |
316 | |
317 case 302: /* MSG_SERVER_HOTLIST_ERROR */ | |
318 buf2 = g_strdup_printf(_("Unable to add \"%s\" to your Napster hotlist"), buf); | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
319 gaim_notify_error(gc, NULL, buf2, NULL); |
5388 | 320 g_free(buf2); |
321 break; | |
322 | |
323 case 316: /* MSG_SERVER_DISCONNECTING */ | |
324 /* we have been kicked off =^( */ | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
325 gaim_notify_error(gc, NULL, |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
326 _("You were disconnected from the server."), NULL); |
5604 | 327 gaim_connection_destroy(gc); |
5388 | 328 break; |
329 | |
330 case 401: /* MSG_CLIENT_PART */ | |
5402 | 331 c = nap_find_chat(gc, buf); |
332 if (c) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
333 serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c))); |
5388 | 334 break; |
335 | |
336 case 403: /* MSG_SERVER_PUBLIC */ | |
337 res = g_strsplit(buf, " ", 3); | |
5402 | 338 c = nap_find_chat(gc, res[0]); |
339 if (c) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
340 serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), res[1], 0, res[2], time((time_t)NULL)); |
5388 | 341 g_strfreev(res); |
342 break; | |
343 | |
344 case 404: /* MSG_SERVER_NOSUCH */ | |
345 /* abused by opennap servers to broadcast stuff */ | |
8495 | 346 buf2 = gaim_escape_html(buf); |
347 serv_got_im(gc, "server", buf2, 0, time(NULL)); | |
348 g_free(buf2); | |
5388 | 349 break; |
350 | |
351 case 405: /* MSG_SERVER_JOIN_ACK */ | |
5402 | 352 c = nap_find_chat(gc, buf); |
353 if (!c) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
354 serv_got_joined_chat(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(c)), buf); |
5388 | 355 break; |
356 | |
357 case 407: /* MSG_SERVER_PART */ | |
358 res = g_strsplit(buf, " ", 0); | |
5402 | 359 c = nap_find_chat(gc, res[0]); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
360 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(c), res[1], NULL); |
5388 | 361 g_strfreev(res); |
362 break; | |
363 | |
364 case 406: /* MSG_SERVER_JOIN */ | |
365 case 408: /* MSG_SERVER_CHANNEL_USER_LIST */ | |
366 res = g_strsplit(buf, " ", 4); | |
5402 | 367 c = nap_find_chat(gc, res[0]); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
368 gaim_conv_chat_add_user(GAIM_CONV_CHAT(c), res[1], NULL); |
5388 | 369 g_strfreev(res); |
370 break; | |
371 | |
372 case 409: /* MSG_SERVER_CHANNEL_USER_LIST_END */ | |
373 break; | |
374 | |
375 case 410: /* MSG_SERVER_TOPIC */ | |
376 /* display the topic in the channel */ | |
377 res = g_strsplit(buf, " ", 2); | |
5402 | 378 c = nap_find_chat(gc, res[0]); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
379 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(c), res[0], res[1]); |
5388 | 380 g_strfreev(res); |
381 break; | |
382 | |
383 case 603: /* MSG_CLIENT_WHOIS */ | |
384 buf2 = g_strdup_printf(_("%s requested your information"), buf); | |
6982 | 385 serv_got_im(gc, "server", buf2, 0, time(NULL)); |
5388 | 386 g_free(buf2); |
387 break; | |
388 | |
389 case 604: /* MSG_SERVER_WHOIS_RESPONSE */ | |
390 /* XXX - Format is: "Elite" 37 " " "Active" 0 0 0 0 "gaim 0.63cvs" 0 0 192.168.1.41 32798 0 unknown flounder */ | |
391 res = g_strsplit(buf, " ", 2); | |
7062
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
392 /* res[0] == username */ |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
393 gaim_notify_formatted(gc, NULL, _("Buddy Information"), NULL, |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
394 res[1], NULL, NULL); |
5388 | 395 g_strfreev(res); |
396 break; | |
397 | |
398 case 621: | |
399 case 622: /* MSG_CLIENT_MOTD */ | |
400 /* also replaces MSG_SERVER_MOTD, so we should display it */ | |
8495 | 401 buf2 = gaim_escape_html(buf); |
402 serv_got_im(gc, "motd", buf2, 0, time(NULL)); | |
403 g_free(buf2); | |
5388 | 404 break; |
405 | |
406 case 627: /* MSG_CLIENT_WALLOP */ | |
407 /* abused by opennap server maintainers to broadcast stuff */ | |
8495 | 408 buf2 = gaim_escape_html(buf); |
409 serv_got_im(gc, "wallop", buf2, 0, time(NULL)); | |
410 g_free(buf2); | |
5388 | 411 break; |
412 | |
413 case 628: /* MSG_CLIENT_ANNOUNCE */ | |
8495 | 414 buf2 = gaim_escape_html(buf); |
415 serv_got_im(gc, "announce", buf2, 0, time(NULL)); | |
416 g_free(buf); | |
5388 | 417 break; |
418 | |
419 case 748: /* MSG_SERVER_GHOST */ | |
420 /* Looks like someone logged in as us! =-O */ | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
421 gaim_notify_error(gc, NULL, |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
422 _("You were disconnected from the server, because " |
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
423 "you logged on from a different location"), NULL); |
5604 | 424 gaim_connection_destroy(gc); |
5388 | 425 break; |
426 | |
427 case 751: /* MSG_CLIENT_PING */ | |
428 buf2 = g_strdup_printf(_("%s requested a PING"), buf); | |
6982 | 429 serv_got_im(gc, "server", buf2, 0, time(NULL)); |
5388 | 430 g_free(buf2); |
431 /* send back a pong */ | |
432 /* MSG_CLIENT_PONG */ | |
433 nap_write_packet(gc, 752, "%s", buf); | |
434 break; | |
435 | |
436 case 752: /* MSG_CLIENT_PONG */ | |
437 buf2 = g_strdup_printf("Received pong from %s", buf); | |
5436
ad445074d239
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5402
diff
changeset
|
438 gaim_notify_info(gc, NULL, buf2, NULL); |
5388 | 439 g_free(buf2); |
440 break; | |
441 | |
442 case 824: /* MSG_CLIENT_EMOTE */ | |
443 res = g_strsplit(buf, " ", 3); | |
444 buf2 = g_strndup(res[2]+1, strlen(res[2]) - 2); /* chomp off the surround quotes */ | |
445 buf3 = g_strdup_printf("/me %s", buf2); | |
446 g_free(buf2); | |
5402 | 447 if ((c = nap_find_chat(gc, res[0]))) { |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7084
diff
changeset
|
448 gaim_conv_chat_write(GAIM_CONV_CHAT(c), res[1], buf3, GAIM_MESSAGE_NICK, time(NULL)); |
5388 | 449 } |
450 g_free(buf3); | |
451 g_strfreev(res); | |
452 break; | |
453 | |
454 default: | |
455 gaim_debug(GAIM_DEBUG_MISC, "napster", "Unknown packet %hd: %s\n", command, buf); | |
456 break; | |
2086 | 457 } |
5388 | 458 |
459 g_free(buf); | |
2086 | 460 } |
461 | |
5388 | 462 /* 002 - MSG_CLIENT_LOGIN */ |
2090
b66aca8e8dce
[gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
463 static void nap_login_connect(gpointer data, gint source, GaimInputCondition cond) |
2086 | 464 { |
5604 | 465 GaimConnection *gc = data; |
5388 | 466 struct nap_data *ndata = (struct nap_data *)gc->proto_data; |
467 gchar *buf; | |
2086 | 468 |
5605 | 469 if (!g_list_find(gaim_connections_get_all(), gc)) { |
2701
8a84f2bb1716
[gaim-migrate @ 2714]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2681
diff
changeset
|
470 close(source); |
8a84f2bb1716
[gaim-migrate @ 2714]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2681
diff
changeset
|
471 return; |
8a84f2bb1716
[gaim-migrate @ 2714]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2681
diff
changeset
|
472 } |
8a84f2bb1716
[gaim-migrate @ 2714]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2681
diff
changeset
|
473 |
2086 | 474 if (source < 0) { |
7981 | 475 gaim_connection_error(gc, _("Unable to connect.")); |
2086 | 476 return; |
477 } | |
478 | |
4452 | 479 ndata->fd = source; |
2086 | 480 |
5388 | 481 /* Update the login progress status display */ |
5604 | 482 buf = g_strdup_printf("Logging in: %s", gaim_account_get_username(gc->account)); |
7884 | 483 gaim_connection_update_progress(gc, buf, 1, NAPSTER_CONNECT_STEPS); |
5388 | 484 g_free(buf); |
485 | |
486 /* Write our signon data */ | |
5604 | 487 nap_write_packet(gc, 2, "%s %s 0 \"gaim %s\" 0", |
488 gaim_account_get_username(gc->account), | |
489 gaim_account_get_password(gc->account), VERSION); | |
5388 | 490 |
2086 | 491 /* And set up the input watcher */ |
5388 | 492 gc->inpa = gaim_input_add(ndata->fd, GAIM_INPUT_READ, nap_callback, gc); |
2086 | 493 } |
494 | |
5604 | 495 static void nap_login(GaimAccount *account) |
2086 | 496 { |
5604 | 497 GaimConnection *gc = gaim_account_get_connection(account); |
5388 | 498 |
7884 | 499 gaim_connection_update_progress(gc, _("Connecting"), 0, NAPSTER_CONNECT_STEPS); |
5388 | 500 |
4460 | 501 gc->proto_data = g_new0(struct nap_data, 1); |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5679
diff
changeset
|
502 if (gaim_proxy_connect(account, |
5604 | 503 gaim_account_get_string(account, "server", NAP_SERVER), |
504 gaim_account_get_int(account, "port", NAP_PORT), | |
4491 | 505 nap_login_connect, gc) != 0) { |
7981 | 506 gaim_connection_error(gc, _("Unable to connect.")); |
2086 | 507 } |
508 } | |
509 | |
5604 | 510 static void nap_close(GaimConnection *gc) |
2086 | 511 { |
512 struct nap_data *ndata = (struct nap_data *)gc->proto_data; | |
5388 | 513 |
2086 | 514 if (gc->inpa) |
2090
b66aca8e8dce
[gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
515 gaim_input_remove(gc->inpa); |
2086 | 516 |
5388 | 517 if (!ndata) |
518 return; | |
519 | |
520 g_free(ndata->email); | |
521 g_free(ndata); | |
2086 | 522 } |
523 | |
6695 | 524 static const char* nap_list_icon(GaimAccount *a, GaimBuddy *b) |
2086 | 525 { |
4687 | 526 return "napster"; |
2086 | 527 } |
528 | |
6695 | 529 static void nap_list_emblems(GaimBuddy *b, char **se, char **sw, char **nw, char **ne) |
4916 | 530 { |
5068 | 531 if (b->present == GAIM_BUDDY_OFFLINE) |
4916 | 532 *se = "offline"; |
533 } | |
534 | |
5604 | 535 static GList *nap_chat_info(GaimConnection *gc) |
2086 | 536 { |
5388 | 537 GList *m = NULL; |
538 struct proto_chat_entry *pce; | |
539 | |
540 pce = g_new0(struct proto_chat_entry, 1); | |
7844 | 541 pce->label = _("_Group:"); |
5388 | 542 pce->identifier = "group"; |
543 m = g_list_append(m, pce); | |
544 | |
545 return m; | |
2086 | 546 } |
5388 | 547 |
548 static GaimPlugin *my_protocol = NULL; | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
549 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
550 static GaimPluginProtocolInfo prpl_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
551 { |
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
552 GAIM_PRPL_API_VERSION, |
5388 | 553 OPT_PROTO_CHAT_TOPIC, |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
554 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
555 NULL, |
9308 | 556 NO_BUDDY_ICONS, |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
557 nap_list_icon, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
558 nap_list_emblems, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
559 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
560 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
561 NULL, |
9030 | 562 NULL, |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
563 nap_chat_info, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
564 nap_login, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
565 nap_close, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
566 nap_send_im, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
567 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
568 NULL, |
5388 | 569 nap_get_info, |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
570 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
571 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
572 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
573 nap_add_buddy, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
574 nap_add_buddies, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
575 nap_remove_buddy, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
576 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
577 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
578 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
579 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
580 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
581 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
582 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
583 nap_join_chat, |
8562 | 584 NULL, /* reject chat invite */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
585 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
586 nap_chat_leave, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
587 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
588 nap_chat_send, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
589 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
590 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
591 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
592 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
593 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
594 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
595 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
596 NULL, |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
597 NULL, |
8586 | 598 NULL, |
8589 | 599 NULL, |
600 NULL, | |
601 NULL, | |
602 NULL, | |
603 NULL, | |
604 NULL, | |
605 NULL, | |
606 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
607 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
608 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
609 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
610 { |
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
8735
diff
changeset
|
611 GAIM_PLUGIN_API_VERSION, /**< api_version */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
612 GAIM_PLUGIN_PROTOCOL, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
613 NULL, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
614 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
615 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
616 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
617 |
5388 | 618 "prpl-napster", /**< id */ |
619 "Napster", /**< name */ | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
620 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
621 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
622 N_("NAPSTER Protocol Plugin"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
623 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
624 N_("NAPSTER Protocol Plugin"), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
625 NULL, /**< author */ |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6321
diff
changeset
|
626 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
627 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
628 NULL, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
629 NULL, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
630 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
631 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
632 NULL, /**< ui_info */ |
8993 | 633 &prpl_info, /**< extra_info */ |
634 NULL, | |
635 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
636 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
637 |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
638 static void init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
639 { |
5638
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
640 GaimAccountOption *option; |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
641 |
5638
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
642 option = gaim_account_option_string_new(_("Server"), "server", |
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
643 NAP_SERVER); |
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
644 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
645 option); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
646 |
5638
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
647 option = gaim_account_option_int_new(_("Port"), "port", 8888); |
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
648 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
0bdfa28c678e
[gaim-migrate @ 6047]
Christian Hammond <chipx86@chipx86.com>
parents:
5605
diff
changeset
|
649 option); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
650 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
651 my_protocol = plugin; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
652 } |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5136
diff
changeset
|
653 |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
654 GAIM_INIT_PLUGIN(napster, init_plugin, info); |