Mercurial > pidgin
comparison plugins/tcl/tcl_cmds.c @ 11338:17142948653e
[gaim-migrate @ 13551]
Change the GAIM_CONV_IM and GAIM_CONV_CHAT enums to GAIM_CONV_TYPE_IM
and GAIM_CONV_TYPE_CHAT. This touched A LOT of files. Also combined
two oscar header files (one of them was small and dorky).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 25 Aug 2005 02:33:44 +0000 |
parents | dae370949a39 |
children | ae682fa78d7f |
comparison
equal
deleted
inserted
replaced
11337:1462b64f8fc9 | 11338:17142948653e |
---|---|
486 if ((error = Tcl_GetIntFromObj(interp, objv[2], | 486 if ((error = Tcl_GetIntFromObj(interp, objv[2], |
487 (int *)&account)) != TCL_OK) | 487 (int *)&account)) != TCL_OK) |
488 return error; | 488 return error; |
489 if (!tcl_validate_account(account, interp)) | 489 if (!tcl_validate_account(account, interp)) |
490 return TCL_ERROR; | 490 return TCL_ERROR; |
491 convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, | 491 convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, |
492 Tcl_GetString(objv[3]), | 492 Tcl_GetString(objv[3]), |
493 account); | 493 account); |
494 Tcl_SetIntObj(result, (int)convo); | 494 Tcl_SetIntObj(result, (int)convo); |
495 break; | 495 break; |
496 case CMD_CONV_HANDLE: | 496 case CMD_CONV_HANDLE: |
512 if (objc < 4) { | 512 if (objc < 4) { |
513 Tcl_WrongNumArgs(interp, 2, objv, "?options? account name"); | 513 Tcl_WrongNumArgs(interp, 2, objv, "?options? account name"); |
514 return TCL_ERROR; | 514 return TCL_ERROR; |
515 } | 515 } |
516 argsused = 2; | 516 argsused = 2; |
517 type = GAIM_CONV_IM; | 517 type = GAIM_CONV_TYPE_IM; |
518 while (argsused < objc) { | 518 while (argsused < objc) { |
519 opt = Tcl_GetString(objv[argsused]); | 519 opt = Tcl_GetString(objv[argsused]); |
520 if (*opt == '-') { | 520 if (*opt == '-') { |
521 if ((error = Tcl_GetIndexFromObj(interp, objv[argsused], newopts, | 521 if ((error = Tcl_GetIndexFromObj(interp, objv[argsused], newopts, |
522 "option", 0, (int *)&newopt)) != TCL_OK) | 522 "option", 0, (int *)&newopt)) != TCL_OK) |
523 return error; | 523 return error; |
524 argsused++; | 524 argsused++; |
525 switch (newopt) { | 525 switch (newopt) { |
526 case CMD_CONV_NEW_CHAT: | 526 case CMD_CONV_NEW_CHAT: |
527 type = GAIM_CONV_CHAT; | 527 type = GAIM_CONV_TYPE_CHAT; |
528 break; | 528 break; |
529 case CMD_CONV_NEW_IM: | 529 case CMD_CONV_NEW_IM: |
530 type = GAIM_CONV_IM; | 530 type = GAIM_CONV_TYPE_IM; |
531 break; | 531 break; |
532 } | 532 } |
533 } else { | 533 } else { |
534 break; | 534 break; |
535 } | 535 } |
568 break; | 568 break; |
569 case CMD_CONV_WRITE_SYSTEM: | 569 case CMD_CONV_WRITE_SYSTEM: |
570 flags = GAIM_MESSAGE_SYSTEM; | 570 flags = GAIM_MESSAGE_SYSTEM; |
571 break; | 571 break; |
572 } | 572 } |
573 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) | 573 if (gaim_conversation_get_type(convo) == GAIM_CONV_TYPE_CHAT) |
574 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, what, flags, time(NULL)); | 574 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, what, flags, time(NULL)); |
575 else | 575 else |
576 gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); | 576 gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); |
577 break; | 577 break; |
578 } | 578 } |