plugins/log_reader.c

changeset 13494
413c793bd39f
parent 13492
70e810de341a
child 13498
6a03aa3b5c1a
equal deleted inserted replaced
13493:598d8f618a31 13494:413c793bd39f
854 /* Try to guess which user is me. 854 /* Try to guess which user is me.
855 * The first step is to determine if either of the names matches either my 855 * The first step is to determine if either of the names matches either my
856 * friendly name or alias. For this test, "match" is defined as: 856 * friendly name or alias. For this test, "match" is defined as:
857 * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$ 857 * ^(friendly_name|alias)([^a-zA-Z0-9].*)?$
858 */ 858 */
859 from_name_matches = ((g_str_has_prefix( 859 from_name_matches = from_name != NULL && (
860 from_name, friendly_name) && 860 (g_str_has_prefix(from_name, friendly_name) &&
861 !isalnum(*(from_name + friendly_name_length))) || 861 !isalnum(*(from_name + friendly_name_length))) ||
862 (g_str_has_prefix(from_name, log->account->alias) && 862 (g_str_has_prefix(from_name, log->account->alias) &&
863 !isalnum(*(from_name + alias_length)))); 863 !isalnum(*(from_name + alias_length))));
864 864
865 to_name_matches = ((g_str_has_prefix( 865 to_name_matches = to_name != NULL && (
866 to_name, friendly_name) && 866 (gaim_str_has_prefix(to_name, friendly_name) &&
867 !isalnum(*(to_name + friendly_name_length))) || 867 !isalnum(*(to_name + friendly_name_length))) ||
868 (g_str_has_prefix(to_name, log->account->alias) && 868 (gaim_str_has_prefix(to_name, log->account->alias) &&
869 !isalnum(*(to_name + alias_length)))); 869 !isalnum(*(to_name + alias_length))));
870 870
871 if (from_name_matches) { 871 if (from_name_matches) {
872 if (!to_name_matches) { 872 if (!to_name_matches) {
873 name_guessed = NAME_GUESS_ME; 873 name_guessed = NAME_GUESS_ME;
874 } 874 }

mercurial