comparison src/perl.c @ 603:9b0717b4a490

[gaim-migrate @ 613] picture_button(GtkWidget *window, char *text, char **xpm); window is the window it will be drawn in. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 04 Aug 2000 04:08:31 +0000
parents 3a24fd19ff5f
children a46a68d46d2b
comparison
equal deleted inserted replaced
602:02ea095a972a 603:9b0717b4a490
78 78
79 /* server stuff */ 79 /* server stuff */
80 XS(XS_AIM_command); /* send command to server */ 80 XS(XS_AIM_command); /* send command to server */
81 XS(XS_AIM_user_info); /* given name, return struct buddy members */ 81 XS(XS_AIM_user_info); /* given name, return struct buddy members */
82 XS(XS_AIM_print_to_conv); /* send message to someone */ 82 XS(XS_AIM_print_to_conv); /* send message to someone */
83 XS(XS_AIM_print_to_chat); /* send message to chat room */
83 84
84 /* handler commands */ 85 /* handler commands */
85 XS(XS_AIM_add_message_handler); /* when people talk */ 86 XS(XS_AIM_add_message_handler); /* when people talk */
86 XS(XS_AIM_add_command_handler); /* when servers talk */ 87 XS(XS_AIM_add_command_handler); /* when servers talk */
87 XS(XS_AIM_add_timeout_handler); /* figure it out */ 88 XS(XS_AIM_add_timeout_handler); /* figure it out */
167 newXS ("AIM::deny_list", XS_AIM_deny_list, "AIM"); 168 newXS ("AIM::deny_list", XS_AIM_deny_list, "AIM");
168 169
169 newXS ("AIM::command", XS_AIM_command, "AIM"); 170 newXS ("AIM::command", XS_AIM_command, "AIM");
170 newXS ("AIM::user_info", XS_AIM_user_info, "AIM"); 171 newXS ("AIM::user_info", XS_AIM_user_info, "AIM");
171 newXS ("AIM::print_to_conv", XS_AIM_print_to_conv, "AIM"); 172 newXS ("AIM::print_to_conv", XS_AIM_print_to_conv, "AIM");
173 newXS ("AIM::print_to_chat", XS_AIM_print_to_chat, "AIM");
172 174
173 newXS ("AIM::add_message_handler", XS_AIM_add_message_handler, "AIM"); 175 newXS ("AIM::add_message_handler", XS_AIM_add_message_handler, "AIM");
174 newXS ("AIM::add_command_handler", XS_AIM_add_command_handler, "AIM"); 176 newXS ("AIM::add_command_handler", XS_AIM_add_command_handler, "AIM");
175 newXS ("AIM::add_timeout_handler", XS_AIM_add_timeout_handler, "AIM"); 177 newXS ("AIM::add_timeout_handler", XS_AIM_add_timeout_handler, "AIM");
176 } 178 }
248 else if (!USE_OSCAR) 250 else if (!USE_OSCAR)
249 XST_mPV(0, "TOC"); 251 XST_mPV(0, "TOC");
250 else 252 else
251 XST_mPV(0, "Oscar"); 253 XST_mPV(0, "Oscar");
252 break; 254 break;
253 /* FIXME */
254 default: 255 default:
255 XST_mPV(0, "Error2"); 256 XST_mPV(0, "Error2");
256 } 257 }
257 258
258 XSRETURN(1); 259 XSRETURN(1);
334 XSRETURN(i); 335 XSRETURN(i);
335 } 336 }
336 337
337 XS (XS_AIM_command) 338 XS (XS_AIM_command)
338 { 339 {
339 /* FIXME */ 340 int junk;
341 char *command = NULL;
342 dXSARGS;
343 items = 0;
344
345 command = SvPV(ST(0), junk);
346 if (!command) XSRETURN(0);
347 if (!strncasecmp(command, "signon", 6)) {
348 } else if (!strncasecmp(command, "signoff", 7)) {
349 } else if (!strncasecmp(command, "away", 4)) {
350 } else if (!strncasecmp(command, "back", 4)) {
351 } else if (!strncasecmp(command, "idle", 4)) {
352 } else if (!strncasecmp(command, "warn", 4)) {
353 }
354
355 XSRETURN(0);
340 } 356 }
341 357
342 XS (XS_AIM_user_info) 358 XS (XS_AIM_user_info)
343 { 359 {
344 int junk; 360 int junk;
378 c = new_conversation(nick); 394 c = new_conversation(nick);
379 write_to_conv(c, what, WFLAG_SEND, NULL); 395 write_to_conv(c, what, WFLAG_SEND, NULL);
380 serv_send_im(nick, what, 0); 396 serv_send_im(nick, what, 0);
381 } 397 }
382 398
399 XS (XS_AIM_print_to_chat)
400 {
401 char *nick, *what;
402 struct conversation *c = NULL;
403 GList *bcs = buddy_chats;
404 int junk;
405 dXSARGS;
406 items = 0;
407
408 nick = SvPV(ST(0), junk);
409 what = SvPV(ST(1), junk);
410 while (bcs) {
411 c = (struct conversation *)bcs->data;
412 if (!strcmp(c->name, nick))
413 break;
414 bcs = bcs->next;
415 c = NULL;
416 }
417 if (!c)
418 XSRETURN(0);
419 serv_chat_send(c->id, what);
420 }
421
383 XS (XS_AIM_add_message_handler) 422 XS (XS_AIM_add_message_handler)
384 { 423 {
385 /* FIXME */ 424 /* FIXME */
386 } 425 }
387 426