| 423 } else if (!strncasecmp(command, "signoff", 7)) { |
423 } else if (!strncasecmp(command, "signoff", 7)) { |
| 424 char *who = SvPV(ST(1), junk); |
424 char *who = SvPV(ST(1), junk); |
| 425 struct gaim_connection *gc = find_gaim_conn_by_name(who); |
425 struct gaim_connection *gc = find_gaim_conn_by_name(who); |
| 426 if (gc) signoff(gc); |
426 if (gc) signoff(gc); |
| 427 else signoff_all(NULL, NULL); |
427 else signoff_all(NULL, NULL); |
| |
428 } else if (!strncasecmp(command, "info", 4)) { |
| |
429 GSList *c = connections; |
| |
430 struct gaim_connection *gc; |
| |
431 while (c) { |
| |
432 gc = (struct gaim_connection *)c->data; |
| |
433 serv_set_info(gc, SvPV(ST(1), junk)); |
| |
434 c = c->next; |
| |
435 } |
| 428 } else if (!strncasecmp(command, "away", 4)) { |
436 } else if (!strncasecmp(command, "away", 4)) { |
| 429 char *message = SvPV(ST(1), junk); |
437 char *message = SvPV(ST(1), junk); |
| 430 static struct away_message a; |
438 static struct away_message a; |
| 431 g_snprintf(a.message, sizeof(a.message), "%s", message); |
439 g_snprintf(a.message, sizeof(a.message), "%s", message); |
| 432 do_away_message(NULL, &a); |
440 do_away_message(NULL, &a); |
| 488 XSRETURN(8); |
496 XSRETURN(8); |
| 489 } |
497 } |
| 490 |
498 |
| 491 XS (XS_GAIM_print_to_conv) |
499 XS (XS_GAIM_print_to_conv) |
| 492 { |
500 { |
| 493 char *nick, *what; |
501 char *nick, *what, *isauto; |
| 494 struct conversation *c; |
502 struct conversation *c; |
| 495 int junk; |
503 int junk; |
| 496 dXSARGS; |
504 dXSARGS; |
| 497 items = 0; |
505 items = 0; |
| 498 |
506 |
| 499 nick = SvPV(ST(0), junk); |
507 nick = SvPV(ST(0), junk); |
| 500 what = SvPV(ST(1), junk); |
508 what = SvPV(ST(1), junk); |
| |
509 isauto = SvPV(ST(2), junk); |
| 501 c = find_conversation(nick); |
510 c = find_conversation(nick); |
| 502 if (!c) |
511 if (!c) |
| 503 c = new_conversation(nick); |
512 c = new_conversation(nick); |
| 504 write_to_conv(c, what, WFLAG_SEND, NULL); |
513 write_to_conv(c, what, WFLAG_SEND, NULL); |
| 505 serv_send_im(c->gc, nick, what, 0); |
514 serv_send_im(c->gc, nick, what, atoi(isauto)); |
| 506 } |
515 } |
| 507 |
516 |
| 508 XS (XS_GAIM_print_to_chat) |
517 XS (XS_GAIM_print_to_chat) |
| 509 { |
518 { |
| 510 char *nick, *what, *tmp; |
519 char *nick, *what, *tmp; |