comparison src/protocols/msn/msn.c @ 7261:1930e3d00ecd

[gaim-migrate @ 7838] prpl-specific normalize is back, after my crusade to kill it. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 14 Oct 2003 05:07:39 +0000
parents aeaa751d32f7
children 85fcaff1505d
comparison
equal deleted inserted replaced
7260:49839c4cbb1c 7261:1930e3d00ecd
34 34
35 #define BUDDY_ALIAS_MAXLEN 388 35 #define BUDDY_ALIAS_MAXLEN 388
36 36
37 static GaimPlugin *my_protocol = NULL; 37 static GaimPlugin *my_protocol = NULL;
38 38
39 static char *msn_normalize(const char *str); 39 static const char *msn_normalize(const GaimAccount *account, const char *str);
40 40
41 typedef struct 41 typedef struct
42 { 42 {
43 GaimConnection *gc; 43 GaimConnection *gc;
44 const char *passport; 44 const char *passport;
459 gc->proto_data = session; 459 gc->proto_data = session;
460 460
461 gaim_connection_update_progress(gc, _("Connecting"), 0, MSN_CONNECT_STEPS); 461 gaim_connection_update_progress(gc, _("Connecting"), 0, MSN_CONNECT_STEPS);
462 462
463 /* Hmm, I don't like this. */ 463 /* Hmm, I don't like this. */
464 username = msn_normalize(gaim_account_get_username(account)); 464 username = msn_normalize(account, gaim_account_get_username(account));
465 465
466 if (strcmp(username, gaim_account_get_username(account))) 466 if (strcmp(username, gaim_account_get_username(account)))
467 gaim_account_set_username(account, username); 467 gaim_account_set_username(account, username);
468 468
469 if (!msn_session_connect(session)) { 469 if (!msn_session_connect(session)) {
648 static void 648 static void
649 msn_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group) 649 msn_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group)
650 { 650 {
651 MsnSession *session = gc->proto_data; 651 MsnSession *session = gc->proto_data;
652 MsnGroup *msn_group = NULL; 652 MsnGroup *msn_group = NULL;
653 char *who; 653 const char *who;
654 char outparams[MSN_BUF_LEN]; 654 char outparams[MSN_BUF_LEN];
655 GSList *l; 655 GSList *l;
656 656
657 who = msn_normalize(name); 657 who = msn_normalize(gc->account, name);
658 658
659 if (strchr(who, ' ')) { 659 if (strchr(who, ' ')) {
660 /* This is a broken blist entry. */ 660 /* This is a broken blist entry. */
661 return; 661 return;
662 } 662 }
1184 1184
1185 msn_switchboard_destroy(swboard); 1185 msn_switchboard_destroy(swboard);
1186 } 1186 }
1187 } 1187 }
1188 1188
1189 static char * 1189 static const char *
1190 msn_normalize(const char *str) 1190 msn_normalize(const GaimAccount *account, const char *str)
1191 { 1191 {
1192 static char buf[BUF_LEN]; 1192 static char buf[BUF_LEN];
1193 1193
1194 g_return_val_if_fail(str != NULL, NULL); 1194 g_return_val_if_fail(str != NULL, NULL);
1195 1195