Mercurial > pidgin.yaz
comparison libpurple/protocols/msnp9/user.c @ 21685:b08d0296ab88
Fix 2 more issues related to friendly names:
- Don't try setting any friendly names for unverified passports
- Don't try setting a friendly name if they are not actually on our friend list
Fixes #4109
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 28 Nov 2007 19:14:26 +0000 |
parents | 4bc7d44f543a |
children | 5ffb0b5f785f |
comparison
equal
deleted
inserted
replaced
21684:c6487d5385f9 | 21685:b08d0296ab88 |
---|---|
124 | 124 |
125 void | 125 void |
126 msn_user_set_friendly_name(MsnUser *user, const char *name) | 126 msn_user_set_friendly_name(MsnUser *user, const char *name) |
127 { | 127 { |
128 MsnCmdProc *cmdproc; | 128 MsnCmdProc *cmdproc; |
129 MsnSession *session; | |
129 const char *encoded; | 130 const char *encoded; |
130 | 131 |
131 g_return_if_fail(user != NULL); | 132 g_return_if_fail(user != NULL); |
132 | 133 |
133 encoded = purple_url_encode(name); | 134 encoded = purple_url_encode(name); |
134 | 135 session = user->userlist->session; |
135 if (user->friendly_name && strcmp(user->friendly_name, name) && (strlen(encoded) < 387)) { | 136 |
137 if (user->friendly_name && strcmp(user->friendly_name, name) | |
138 && (strlen(encoded) < 387) && session->passport_info.verified && | |
139 (user->list_op & MSN_LIST_FL_OP)) { | |
136 /* copy the new name to the server list, but only when new */ | 140 /* copy the new name to the server list, but only when new */ |
137 /* should we check this more thoroughly? */ | 141 /* should we check this more thoroughly? */ |
138 cmdproc = user->userlist->session->notification->cmdproc; | 142 cmdproc = session->notification->cmdproc; |
139 msn_cmdproc_send(cmdproc, "REA", "%s %s", | 143 msn_cmdproc_send(cmdproc, "REA", "%s %s", |
140 user->passport, | 144 user->passport, |
141 encoded); | 145 encoded); |
142 } | 146 } |
143 | 147 |