| 101 SILC_UMODE_HYPER | |
101 SILC_UMODE_HYPER | |
| 102 SILC_UMODE_BUSY | |
102 SILC_UMODE_BUSY | |
| 103 SILC_UMODE_INDISPOSED | |
103 SILC_UMODE_INDISPOSED | |
| 104 SILC_UMODE_PAGE); |
104 SILC_UMODE_PAGE); |
| 105 |
105 |
| 106 if (!strcmp(state, "hyper")) |
106 if (purple_strequal(state, "hyper")) |
| 107 mode |= SILC_UMODE_HYPER; |
107 mode |= SILC_UMODE_HYPER; |
| 108 else if (!strcmp(state, "away")) |
108 else if (purple_strequal(state, "away")) |
| 109 mode |= SILC_UMODE_GONE; |
109 mode |= SILC_UMODE_GONE; |
| 110 else if (!strcmp(state, "busy")) |
110 else if (purple_strequal(state, "busy")) |
| 111 mode |= SILC_UMODE_BUSY; |
111 mode |= SILC_UMODE_BUSY; |
| 112 else if (!strcmp(state, "indisposed")) |
112 else if (purple_strequal(state, "indisposed")) |
| 113 mode |= SILC_UMODE_INDISPOSED; |
113 mode |= SILC_UMODE_INDISPOSED; |
| 114 else if (!strcmp(state, "page")) |
114 else if (purple_strequal(state, "page")) |
| 115 mode |= SILC_UMODE_PAGE; |
115 mode |= SILC_UMODE_PAGE; |
| 116 |
116 |
| 117 /* Send UMODE */ |
117 /* Send UMODE */ |
| 118 idp = silc_id_payload_encode(sg->conn->local_id, SILC_ID_CLIENT); |
118 idp = silc_id_payload_encode(sg->conn->local_id, SILC_ID_CLIENT); |
| 119 SILC_PUT32_MSB(mode, mb); |
119 SILC_PUT32_MSB(mode, mb); |
| 600 |
600 |
| 601 /* Register requested cipher and HMAC */ |
601 /* Register requested cipher and HMAC */ |
| 602 cipher = purple_account_get_string(account, "cipher", |
602 cipher = purple_account_get_string(account, "cipher", |
| 603 SILC_DEFAULT_CIPHER); |
603 SILC_DEFAULT_CIPHER); |
| 604 for (i = 0; silc_default_ciphers[i].name; i++) |
604 for (i = 0; silc_default_ciphers[i].name; i++) |
| 605 if (!strcmp(silc_default_ciphers[i].name, cipher)) { |
605 if (purple_strequal(silc_default_ciphers[i].name, cipher)) { |
| 606 silc_cipher_register(&(silc_default_ciphers[i])); |
606 silc_cipher_register(&(silc_default_ciphers[i])); |
| 607 break; |
607 break; |
| 608 } |
608 } |
| 609 hmac = purple_account_get_string(account, "hmac", SILC_DEFAULT_HMAC); |
609 hmac = purple_account_get_string(account, "hmac", SILC_DEFAULT_HMAC); |
| 610 for (i = 0; silc_default_hmacs[i].name; i++) |
610 for (i = 0; silc_default_hmacs[i].name; i++) |
| 611 if (!strcmp(silc_default_hmacs[i].name, hmac)) { |
611 if (purple_strequal(silc_default_hmacs[i].name, hmac)) { |
| 612 silc_hmac_register(&(silc_default_hmacs[i])); |
612 silc_hmac_register(&(silc_default_hmacs[i])); |
| 613 break; |
613 break; |
| 614 } |
614 } |
| 615 |
615 |
| 616 sg = silc_calloc(1, sizeof(*sg)); |
616 sg = silc_calloc(1, sizeof(*sg)); |
| 1157 if (val && *val) |
1157 if (val && *val) |
| 1158 pass2 = val; |
1158 pass2 = val; |
| 1159 else |
1159 else |
| 1160 pass2 = ""; |
1160 pass2 = ""; |
| 1161 |
1161 |
| 1162 if (strcmp(pass1, pass2)) { |
1162 if (!purple_strequal(pass1, pass2)) { |
| 1163 purple_notify_error(gc, _("Create New SILC Key Pair"), |
1163 purple_notify_error(gc, _("Create New SILC Key Pair"), |
| 1164 _("Passphrases do not match"), NULL, |
1164 _("Passphrases do not match"), NULL, |
| 1165 purple_request_cpar_from_connection(gc)); |
1165 purple_request_cpar_from_connection(gc)); |
| 1166 return; |
1166 return; |
| 1167 } |
1167 } |