Changeset 5345ea7
- Timestamp:
- Mar 29, 2009, 10:55:56 AM (15 years ago)
- Branches:
- owl
- Children:
- 924ee11
- Parents:
- b310c0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rfa00c5c r5345ea7 2539 2539 { 2540 2540 owl_filter *f; 2541 char *argbuff, *longuser, * shortuser, *filtname;2541 char *argbuff, *longuser, *esclonguser, *shortuser, *filtname; 2542 2542 2543 2543 /* stick the local realm on if it's not there */ … … 2546 2546 2547 2547 /* name for the filter */ 2548 filtname=owl_malloc(strlen(shortuser)+20); 2549 sprintf(filtname, "user-%s", shortuser); 2548 filtname=owl_sprintf("user-%s", shortuser); 2550 2549 2551 2550 /* if it already exists then go with it. This lets users override */ … … 2557 2556 f=owl_malloc(sizeof(owl_filter)); 2558 2557 2559 argbuff=owl_malloc(strlen(longuser)+1000); 2560 sprintf(argbuff, "( type ^zephyr$ and ( class ^message$ and instance ^personal$ and "); 2561 sprintf(argbuff, "%s ( ( direction ^in$ and sender ^%s$ ) or ( direction ^out$ and recipient ^%s$ ) ) )", argbuff, longuser, longuser); 2562 sprintf(argbuff, "%s or ( ( class ^login$ ) and ( sender ^%s$ ) ) )", argbuff, longuser); 2558 esclonguser = owl_text_quote(longuser, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH); 2559 2560 argbuff=owl_sprintf("( type ^zephyr$ and filter personal and " 2561 "( ( direction ^in$ and sender ^%1$s$ ) or ( direction ^out$ and " 2562 "recipient ^%1$s$ ) ) ) or ( ( class ^login$ ) and ( sender ^%1$s$ ) )", 2563 esclonguser); 2563 2564 2564 2565 owl_filter_init_fromstring(f, filtname, argbuff); … … 2570 2571 owl_free(argbuff); 2571 2572 owl_free(longuser); 2573 owl_free(esclonguser); 2572 2574 owl_free(shortuser); 2573 2575
Note: See TracChangeset
for help on using the changeset viewer.