Mercurial > pidgin.yaz
comparison src/gaimrc.c @ 6175:a97b47ff5a7e
[gaim-migrate @ 6660]
This should prevent the problems we've had with accounts being imported.
I'm ready for 0.66, how about everyone else? :)
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 17 Jul 2003 06:19:42 +0000 |
parents | 7ec9166fd2c8 |
children | aa806c22fb40 |
comparison
equal
deleted
inserted
replaced
6174:8293762bdc27 | 6175:a97b47ff5a7e |
---|---|
596 if (strcmp(p->option, "proto_opts")) | 596 if (strcmp(p->option, "proto_opts")) |
597 return account; | 597 return account; |
598 | 598 |
599 /* I hate this part. We must convert the protocol options. */ | 599 /* I hate this part. We must convert the protocol options. */ |
600 switch (gaim_account_get_protocol(account)) { | 600 switch (gaim_account_get_protocol(account)) { |
601 /* TOC */ | |
601 case GAIM_PROTO_TOC: | 602 case GAIM_PROTO_TOC: |
603 if (*p->value[0] == '\0') | |
604 gaim_account_set_string(account, "server", "toc.oscar.aol.com"); | |
605 else | |
606 gaim_account_set_string(account, "server", p->value[0]); | |
607 | |
608 if (*p->value[1] == '\0') | |
609 gaim_account_set_int(account, "port", 9898); | |
610 else | |
611 gaim_account_set_int(account, "port", atoi(p->value[1])); | |
612 | |
613 break; | |
614 | |
615 /* OSCAR */ | |
602 case GAIM_PROTO_OSCAR: | 616 case GAIM_PROTO_OSCAR: |
603 gaim_account_set_string(account, "server", p->value[0]); | 617 if (*p->value[0] == '\0') |
604 gaim_account_set_int(account, "port", atoi(p->value[1])); | 618 gaim_account_set_string(account, "server", |
619 "login.oscar.aol.com"); | |
620 else | |
621 gaim_account_set_string(account, "server", p->value[0]); | |
622 | |
623 if (*p->value[1] == '\0') | |
624 gaim_account_set_int(account, "port", 5190); | |
625 else | |
626 gaim_account_set_int(account, "port", atoi(p->value[1])); | |
627 | |
605 break; | 628 break; |
606 | 629 |
630 /* Jabber */ | |
607 case GAIM_PROTO_JABBER: | 631 case GAIM_PROTO_JABBER: |
608 gaim_account_set_string(account, "connect_server", p->value[1]); | 632 if (*p->value[0] == '\0') |
609 gaim_account_set_int(account, "port", atoi(p->value[0])); | 633 gaim_account_set_int(account, "port", 5222); |
634 else | |
635 gaim_account_set_int(account, "port", atoi(p->value[0])); | |
636 | |
637 if (*p->value[1] != '\0') | |
638 gaim_account_set_string(account, "connect_server", p->value[1]); | |
639 | |
610 break; | 640 break; |
611 | 641 |
642 /* Napster */ | |
643 case GAIM_PROTO_NAPSTER: | |
644 if (*p->value[3] == '\0') | |
645 gaim_account_set_string(account, "server", "64.124.41.187"); | |
646 else | |
647 gaim_account_set_string(account, "server", p->value[3]); | |
648 | |
649 if (*p->value[4] == '\0') | |
650 gaim_account_set_int(account, "port", 8888); | |
651 else | |
652 gaim_account_set_int(account, "port", atoi(p->value[4])); | |
653 | |
654 break; | |
655 | |
656 /* Yahoo! */ | |
657 case GAIM_PROTO_YAHOO: | |
658 if (*p->value[3] == '\0') | |
659 gaim_account_set_string(account, "server", "scs.yahoo.com"); | |
660 else | |
661 gaim_account_set_string(account, "server", p->value[3]); | |
662 | |
663 if (*p->value[4] == '\0') | |
664 gaim_account_set_int(account, "port", 5050); | |
665 else | |
666 gaim_account_set_int(account, "port", atoi(p->value[4])); | |
667 | |
668 break; | |
669 | |
670 /* MSN */ | |
612 case GAIM_PROTO_MSN: | 671 case GAIM_PROTO_MSN: |
613 case GAIM_PROTO_NAPSTER: | 672 if (*p->value[3] == '\0') |
614 case GAIM_PROTO_YAHOO: | 673 gaim_account_set_string(account, "server", |
615 gaim_account_set_string(account, "server", p->value[3]); | 674 "messenger.hotmail.com"); |
616 gaim_account_set_int(account, "port", atoi(p->value[4])); | 675 else |
676 gaim_account_set_string(account, "server", p->value[3]); | |
677 | |
678 if (*p->value[4] == '\0') | |
679 gaim_account_set_int(account, "port", 1863); | |
680 else | |
681 gaim_account_set_int(account, "port", atoi(p->value[4])); | |
682 | |
617 break; | 683 break; |
618 | 684 |
685 /* IRC */ | |
619 case GAIM_PROTO_IRC: | 686 case GAIM_PROTO_IRC: |
620 if(strlen(p->value[0]) && !strchr(account->username, '@')) { | 687 if (*p->value[0] != '\0' && |
621 tmp = g_strdup_printf("%s@%s", account->username, p->value[0]); | 688 strchr(gaim_account_get_username(account), '@') == NULL) { |
689 | |
690 tmp = g_strdup_printf("%s@%s", | |
691 gaim_account_get_username(account), p->value[0]); | |
622 gaim_account_set_username(account, tmp); | 692 gaim_account_set_username(account, tmp); |
623 g_free(tmp); | 693 g_free(tmp); |
624 } | 694 } |
625 gaim_account_set_int(account, "port", atoi(p->value[1])); | 695 |
626 gaim_account_set_string(account, "charset", p->value[2]); | 696 if (*p->value[1] == '\0') |
697 gaim_account_set_int(account, "port", 6667); | |
698 else | |
699 gaim_account_set_int(account, "port", atoi(p->value[1])); | |
700 | |
701 if (*p->value[2] == '\0') | |
702 gaim_account_set_string(account, "charset", "ISO-8859-1"); | |
703 else | |
704 gaim_account_set_string(account, "charset", p->value[2]); | |
705 | |
627 break; | 706 break; |
628 | 707 |
629 default: | 708 default: |
630 break; | 709 break; |
631 } | 710 } |