Changeset ecaec21 for functions.c
- Timestamp:
- May 7, 2010, 9:40:42 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 63d9de9
- Parents:
- 4727d31
- git-author:
- Nelson Elhage <nelhage@mit.edu> (05/07/10 21:19:09)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/07/10 21:40:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
ra41c8d1 recaec21 2506 2506 } 2507 2507 2508 static char *owl_function_smartfilter_cc(const owl_message *m) { 2509 const char *ccs; 2510 char *filtname; 2511 char *text; 2512 owl_filter *f; 2513 2514 ccs = owl_message_get_attribute_value(m, "zephyr_ccs"); 2515 2516 filtname = owl_sprintf("conversation-%s", ccs); 2517 owl_text_tr(filtname, ' ', '-'); 2518 2519 if (owl_global_get_filter(&g, filtname)) { 2520 return filtname; 2521 } 2522 2523 text = owl_sprintf("type ^zephyr$ and filter personal and " 2524 "zephyr_ccs ^%s%s%s$", 2525 owl_getquoting(ccs), ccs, owl_getquoting(ccs)); 2526 2527 f = owl_filter_new_fromstring(filtname, text); 2528 2529 owl_global_add_filter(&g, f); 2530 2531 owl_free(text); 2532 2533 return filtname; 2534 } 2535 2508 2536 /* Create a filter based on the current message. Returns the name of 2509 2537 * a filter or null. The caller must free this name. … … 2559 2587 if (owl_message_is_type_zephyr(m)) { 2560 2588 if (owl_message_is_personal(m) || owl_message_is_loginout(m)) { 2589 if (owl_message_get_attribute_value(m, "zephyr_ccs") != NULL) { 2590 return owl_function_smartfilter_cc(m); 2591 } 2592 2561 2593 if (owl_message_is_direction_in(m)) { 2562 2594 zperson=short_zuser(owl_message_get_sender(m));
Note: See TracChangeset
for help on using the changeset viewer.