| 323 } |
323 } |
| 324 } |
324 } |
| 325 break; |
325 break; |
| 326 case 2: |
326 case 2: |
| 327 { |
327 { |
| 328 struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); |
328 struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); |
| |
329 debug_printf("%lu %lu\n", connections->data, gc); |
| 329 if (g_slist_find(connections, gc)) |
330 if (g_slist_find(connections, gc)) |
| 330 XST_mIV(i++, gc->protocol); |
331 XST_mIV(i++, gc->protocol); |
| 331 else |
332 else |
| 332 XST_mIV(i++, -1); |
333 XST_mIV(i++, -1); |
| 333 } |
334 } |
| 334 break; |
335 break; |
| 335 case 3: |
336 case 3: |
| 336 { |
337 { |
| 337 struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); |
338 struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); |
| |
339 debug_printf("%lu %lu\n", connections->data, gc); |
| 338 if (g_slist_find(connections, gc)) |
340 if (g_slist_find(connections, gc)) |
| 339 XST_mPV(i++, gc->username); |
341 XST_mPV(i++, gc->username); |
| 340 else |
342 else |
| 341 XST_mPV(i++, ""); |
343 XST_mPV(i++, ""); |
| 342 } |
344 } |
| |
345 break; |
| 343 case 4: |
346 case 4: |
| 344 { |
347 { |
| 345 struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); |
348 struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); |
| |
349 debug_printf("%lu %lu\n", connections->data, gc); |
| 346 if (g_slist_find(connections, gc)) |
350 if (g_slist_find(connections, gc)) |
| 347 XST_mIV(i++, g_list_index(aim_users, gc->user)); |
351 XST_mIV(i++, g_list_index(aim_users, gc->user)); |
| 348 else |
352 else |
| 349 XST_mIV(i++, -1); |
353 XST_mIV(i++, -1); |
| 350 } |
354 } |
| 365 while (a) { |
369 while (a) { |
| 366 struct aim_user *u = a->data; |
370 struct aim_user *u = a->data; |
| 367 XST_mIV(i++, u->protocol); |
371 XST_mIV(i++, u->protocol); |
| 368 a = a->next; |
372 a = a->next; |
| 369 } |
373 } |
| |
374 } |
| |
375 break; |
| |
376 case 7: |
| |
377 { |
| |
378 struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); |
| |
379 debug_printf("%lu %lu\n", connections->data, gc); |
| |
380 if (g_slist_find(connections, gc)) |
| |
381 XST_mPV(i++, (*gc->prpl->name)()); |
| |
382 else |
| |
383 XST_mPV(i++, "Unknown"); |
| 370 } |
384 } |
| 371 break; |
385 break; |
| 372 default: |
386 default: |
| 373 XST_mPV(0, "Error2"); |
387 XST_mPV(0, "Error2"); |
| 374 i = 1; |
388 i = 1; |
| 480 struct gaim_connection *gc; |
494 struct gaim_connection *gc; |
| 481 |
495 |
| 482 while (c) { |
496 while (c) { |
| 483 gc = (struct gaim_connection *)c->data; |
497 gc = (struct gaim_connection *)c->data; |
| 484 serv_set_idle(gc, SvIV(ST(1))); |
498 serv_set_idle(gc, SvIV(ST(1))); |
| 485 gc->is_idle = 1; |
|
| 486 c = c->next; |
499 c = c->next; |
| 487 } |
500 } |
| 488 } else if (!strncasecmp(command, "warn", 4)) { |
501 } else if (!strncasecmp(command, "warn", 4)) { |
| 489 GSList *c = connections; |
502 GSList *c = connections; |
| 490 struct gaim_connection *gc; |
503 struct gaim_connection *gc; |
| 685 struct _perl_timeout_handlers *handler; |
698 struct _perl_timeout_handlers *handler; |
| 686 dXSARGS; |
699 dXSARGS; |
| 687 items = 0; |
700 items = 0; |
| 688 |
701 |
| 689 handler = g_new0(struct _perl_timeout_handlers, 1); |
702 handler = g_new0(struct _perl_timeout_handlers, 1); |
| 690 timeout = 1000 * atol(SvPV(ST(0), junk)); |
703 timeout = 1000 * SvIV(ST(0)); |
| |
704 debug_printf("Adding timeout for %d seconds.\n", timeout/1000); |
| 691 handler->handler_name = g_strdup(SvPV(ST(1), junk)); |
705 handler->handler_name = g_strdup(SvPV(ST(1), junk)); |
| 692 perl_timeout_handlers = g_list_append(perl_timeout_handlers, handler); |
706 perl_timeout_handlers = g_list_append(perl_timeout_handlers, handler); |
| 693 handler->iotag = gtk_timeout_add(timeout, (GtkFunction)perl_timeout, handler); |
707 handler->iotag = gtk_timeout_add(timeout, (GtkFunction)perl_timeout, handler); |
| 694 XSRETURN_EMPTY; |
708 XSRETURN_EMPTY; |
| 695 } |
709 } |