Changeset 9a2ae6c for functions.c
- Timestamp:
- Nov 17, 2008, 6:53:45 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 9711a6e
- Parents:
- 2c09826
- git-author:
- Geoffrey Thomas <geofft@mit.edu> (11/17/08 02:20:31)
- git-committer:
- Geoffrey Thomas <geofft@mit.edu> (11/17/08 18:53:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
r2c09826 r9a2ae6c 2622 2622 2623 2623 /* name for the filter */ 2624 filtname=owl_malloc(strlen(shortuser)+20); 2625 sprintf(filtname, "user-%s", shortuser); 2624 filtname=owl_sprintf("user-%s", shortuser); 2626 2625 2627 2626 /* if it already exists then go with it. This lets users override */ … … 2633 2632 f=owl_malloc(sizeof(owl_filter)); 2634 2633 2635 argbuff=owl_ malloc(strlen(longuser)+1000);2636 sprintf(argbuff, "( type ^zephyr$ and filter personal and ");2637 sprintf(argbuff, "%s ( ( direction ^in$ and sender ^%s$ ) or ( direction ^out$ and recipient ^%s$ ) ) )", argbuff, longuser, longuser);2638 sprintf(argbuff, "%s or ( ( class ^login$ ) and ( sender ^%s$ ) )", argbuff,longuser);2634 argbuff=owl_sprintf("( type ^zephyr$ and filter personal and " 2635 "( ( direction ^in$ and sender ^%1$s$ ) or ( direction ^out$ and " 2636 "recipient ^%1$s$ ) ) ) or ( ( class ^login$ ) and ( sender ^%1$s$ ) )", 2637 longuser); 2639 2638 2640 2639 owl_filter_init_fromstring(f, filtname, argbuff); … … 2664 2663 2665 2664 /* name for the filter */ 2666 filtname=owl_malloc(strlen(user)+40); 2667 sprintf(filtname, "aimuser-%s", user); 2665 filtname=owl_sprintf("aimuser-%s", user); 2668 2666 2669 2667 /* if it already exists then go with it. This lets users override */ … … 2677 2675 escuser = owl_text_quote(user, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH); 2678 2676 2679 argbuff=owl_malloc(1000); 2680 sprintf(argbuff, 2681 "( type ^aim$ and ( ( sender ^%s$ and recipient ^%s$ ) or ( sender ^%s$ and recipient ^%s$ ) ) )", 2682 escuser, owl_global_get_aim_screenname_for_filters(&g), 2683 owl_global_get_aim_screenname_for_filters(&g), escuser); 2677 argbuff = owl_sprintf( 2678 "( type ^aim$ and ( ( sender ^%1$s$ and recipient ^%2$s$ ) or " 2679 "( sender ^%2$s$ and recipient ^%1$s$ ) ) )", 2680 escuser, owl_global_get_aim_screenname_for_filters(&g)); 2684 2681 2685 2682 owl_filter_init_fromstring(f, filtname, argbuff);
Note: See TracChangeset
for help on using the changeset viewer.