Changeset 995eb4b for functions.c


Ignore:
Timestamp:
Oct 26, 2003, 4:24:23 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d63690b
Parents:
bc08664
Message:
Smart filters now work with weird regex characters
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rbc08664 r995eb4b  
    23942394  /* downcase it */
    23952395  downstr(filtname);
    2396   /* turn spaces into hyphens */
     2396  /* turn spaces into dots */
    23972397  owl_text_tr(filtname, ' ', '.');
    23982398 
     
    24042404  /* create the new filter */
    24052405  argbuff=owl_malloc(len+20);
    2406   tmpclass=owl_strdup(class);
    2407   owl_text_tr(tmpclass, ' ', '.');
     2406  tmpclass=owl_text_quote(class, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    24082407  if (instance) {
    2409     tmpinstance=owl_strdup(instance);
    2410     owl_text_tr(tmpinstance, ' ', '.');
     2408    tmpinstance=owl_text_quote(instance, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    24112409  }
    24122410  sprintf(argbuff, "( class ^%s$ )", tmpclass);
     
    25942592  if (owl_message_is_type_admin(m)) {
    25952593    return(owl_function_typefilt("admin"));
     2594  }
     2595
     2596  /* very simple handling of loopback messages for now */
     2597  if (owl_message_is_type_loopback(m)) {
     2598    return(owl_function_typefilt("loopback"));
    25962599  }
    25972600
Note: See TracChangeset for help on using the changeset viewer.