Mercurial > pidgin
comparison plugins/log_reader.c @ 14106:a82d407d38fa
[gaim-migrate @ 16740]
Fix for CID 97
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Mon, 14 Aug 2006 00:08:15 +0000 |
| parents | ec4a3eb4c709 |
| children |
comparison
equal
deleted
inserted
replaced
| 14105:eaf7f35635bc | 14106:a82d407d38fa |
|---|---|
| 855 /* Try to guess which user is me. | 855 /* Try to guess which user is me. |
| 856 * The first step is to determine if either of the names matches either my | 856 * The first step is to determine if either of the names matches either my |
| 857 * friendly name or alias. For this test, "match" is defined as: | 857 * friendly name or alias. For this test, "match" is defined as: |
| 858 * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$ | 858 * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$ |
| 859 */ | 859 */ |
| 860 from_name_matches = from_name != NULL && ( | 860 from_name_matches = (gaim_str_has_prefix(from_name, friendly_name) && |
| 861 (gaim_str_has_prefix(from_name, friendly_name) && | |
| 862 !isalnum(*(from_name + friendly_name_length))) || | 861 !isalnum(*(from_name + friendly_name_length))) || |
| 863 (gaim_str_has_prefix(from_name, log->account->alias) && | 862 (gaim_str_has_prefix(from_name, log->account->alias) && |
| 864 !isalnum(*(from_name + alias_length)))); | 863 !isalnum(*(from_name + alias_length))); |
| 865 | 864 |
| 866 to_name_matches = to_name != NULL && ( | 865 to_name_matches = to_name != NULL && ( |
| 867 (gaim_str_has_prefix(to_name, friendly_name) && | 866 (gaim_str_has_prefix(to_name, friendly_name) && |
| 868 !isalnum(*(to_name + friendly_name_length))) || | 867 !isalnum(*(to_name + friendly_name_length))) || |
| 869 (gaim_str_has_prefix(to_name, log->account->alias) && | 868 (gaim_str_has_prefix(to_name, log->account->alias) && |
| 928 from_name, | 927 from_name, |
| 929 buddy->server_alias) && | 928 buddy->server_alias) && |
| 930 !isalnum(*(from_name + | 929 !isalnum(*(from_name + |
| 931 friendly_name_length))); | 930 friendly_name_length))); |
| 932 | 931 |
| 933 to_name_matches = (gaim_str_has_prefix( | 932 to_name_matches = to_name && ( |
| 933 (gaim_str_has_prefix( | |
| 934 to_name, buddy->server_alias) && | 934 to_name, buddy->server_alias) && |
| 935 !isalnum(*(to_name + | 935 !isalnum(*(to_name + |
| 936 friendly_name_length))); | 936 friendly_name_length)))); |
| 937 | 937 |
| 938 if (from_name_matches) { | 938 if (from_name_matches) { |
| 939 if (!to_name_matches) { | 939 if (!to_name_matches) { |
| 940 name_guessed = NAME_GUESS_THEM; | 940 name_guessed = NAME_GUESS_THEM; |
| 941 } | 941 } |
