Changeset 81655f8 for global.c


Ignore:
Timestamp:
May 12, 2008, 8:01:58 PM (13 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9f4e3f8
Parents:
6b3878b
Message:
* filterelement.c - quote regexp filter elements with spaces in them.
* functions.c - deal with smart-narrowing when the user's screenname has spaces in it.
* owl.h - add a new struct member to the global to hold an escaped aim screenname.
* global.c - populate the aforementioned new struct member.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rdb0ac7e r81655f8  
    9898
    9999  g->aim_screenname=NULL;
     100  g->aim_screenname_for_filters=NULL;
    100101  g->aim_loggedin=0;
    101102  owl_timer_create_countdown(&(g->aim_noop_timer), 30);
     
    748749}
    749750
     751char *owl_global_get_aim_screenname_for_filters(owl_global *g)
     752{
     753  if (owl_global_is_aimloggedin(g)) {
     754    return (g->aim_screenname_for_filters);
     755  }
     756  return("");
     757}
     758
    750759void owl_global_set_aimloggedin(owl_global *g, char *screenname)
    751760{
     761  char *sn_escaped, *quote;
    752762  g->aim_loggedin=1;
    753763  if (g->aim_screenname) owl_free(g->aim_screenname);
     764  if (g->aim_screenname_for_filters) owl_free(g->aim_screenname_for_filters);
    754765  g->aim_screenname=owl_strdup(screenname);
     766  sn_escaped = owl_text_quote(screenname, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
     767  quote = owl_getquoting(sn_escaped);
     768  g->aim_screenname_for_filters=sprintf("%s%s%s", quote, sn_escaped, quote);
     769  owl_free(sn_escaped);
    755770}
    756771
Note: See TracChangeset for help on using the changeset viewer.