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