Changes in commands.c [7ba9e0de:987cf3f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r7ba9e0de r987cf3f 106 106 OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE, 107 107 "send a zephyr", 108 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [<user> ...] [-m <message...>]",108 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [<user> ...] [-m <message...>]", 109 109 "Zwrite send a zephyr to the one or more users specified.\n\n" 110 110 "The following options are available:\n\n" … … 136 136 "Send a local message.\n"), 137 137 138 OWLCMD_ARGS("zcrypt", owl_command_z crypt, OWL_CTX_INTERACTIVE,138 OWLCMD_ARGS("zcrypt", owl_command_zwrite, OWL_CTX_INTERACTIVE, 139 139 "send an encrypted zephyr", 140 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [-m <message...>]\n",140 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\n", 141 141 "Behaves like zwrite but uses encryption. Not for use with\n" 142 142 "personal messages\n"), … … 148 148 "allow editing.\n\n" 149 149 "If 'sender' is specified, reply to the sender.\n\n" 150 "If 'all' or no args are specified, reply public ally to the\n"150 "If 'all' or no args are specified, reply publicly to the\n" 151 151 "same class/instance for non-personal messages and to the\n" 152 152 "sender for personal messages.\n\n" … … 266 266 "zpunt <class> <instance> [recipient]\n" 267 267 "zpunt <instance>", 268 "The zpunt command will sup ress messageto the specified\n"268 "The zpunt command will suppress messages to the specified\n" 269 269 "zephyr triplet. In the second usage messages are suppressed\n" 270 270 "for class MESSAGE and the named instance.\n\n" … … 283 283 "punt <filter-text>", 284 284 "punt <filter-text (multiple words)>\n" 285 "The punt command will sup ress messageto the specified\n"285 "The punt command will suppress messages to the specified\n" 286 286 "filter\n\n" 287 287 "SEE ALSO: unpunt, zpunt, show zpunts\n"), … … 586 586 "name style after the -s argument.\n" 587 587 "\n" 588 "The other usages listed above are abbre ivated forms that simply set\n"588 "The other usages listed above are abbreviated forms that simply set\n" 589 589 "the filter of the current view. The -d option allows you to write a\n" 590 590 "filter expression that will be dynamically created by owl and then\n" … … 594 594 OWLCMD_ARGS("smartnarrow", owl_command_smartnarrow, OWL_CTX_INTERACTIVE, 595 595 "view only messages similar to the current message", 596 "smartnarrow [-i | --instance] [-r | --relat de]",596 "smartnarrow [-i | --instance] [-r | --related]", 597 597 "If the curmsg is a personal message narrow\n" 598 598 " to the conversation with that user.\n" … … 614 614 " message, the filter is to that instance.\n" 615 615 "If the curmsg is a class message, the filter is that class.\n" 616 "If the curmsg is a class message and '-i' is speci ed\n"616 "If the curmsg is a class message and '-i' is specified\n" 617 617 " the filter is to that class and instance.\n"), 618 618 … … 674 674 "for formatting messages.\n\n" 675 675 "Show variables will list the names of all variables.\n\n" 676 "Show errors will show a list of errors e countered by Owl.\n\n"676 "Show errors will show a list of errors encountered by Owl.\n\n" 677 677 "SEE ALSO: filter, view, alias, bindkey, help\n"), 678 678 … … 743 743 "set the search highlight string without searching", 744 744 "setsearch <string>", 745 "The setsearch command highlights all occur ences of its\n"745 "The setsearch command highlights all occurrences of its\n" 746 746 "argument and makes it the default argument for future\n" 747 747 "search commands, but does not move the cursor. With\n" … … 1914 1914 char *owl_command_zwrite(int argc, const char *const *argv, const char *buff) 1915 1915 { 1916 owl_zwrite z;1916 owl_zwrite *z; 1917 1917 1918 1918 if (!owl_global_is_havezephyr(&g)) { … … 1921 1921 } 1922 1922 /* check for a zwrite -m */ 1923 owl_zwrite_create_from_line(&z, buff); 1924 if (owl_zwrite_is_message_set(&z)) { 1925 owl_function_zwrite(buff, NULL); 1926 owl_zwrite_cleanup(&z); 1927 return (NULL); 1928 } 1929 owl_zwrite_cleanup(&z); 1923 z = owl_zwrite_new(buff); 1924 if (!z) { 1925 owl_function_error("Error in zwrite arguments"); 1926 return NULL; 1927 } 1928 1929 if (owl_zwrite_is_message_set(z)) { 1930 owl_function_zwrite(z, NULL); 1931 owl_zwrite_delete(z); 1932 return NULL; 1933 } 1930 1934 1931 1935 if (argc < 2) { 1936 owl_zwrite_delete(z); 1932 1937 owl_function_makemsg("Not enough arguments to the zwrite command."); 1933 1938 } else { 1934 owl_function_zwrite_setup( buff);1939 owl_function_zwrite_setup(z); 1935 1940 } 1936 1941 return(NULL); … … 2022 2027 } 2023 2028 2024 char *owl_command_zcrypt(int argc, const char *const *argv, const char *buff)2025 {2026 owl_zwrite z;2027 2028 if (!owl_global_is_havezephyr(&g)) {2029 owl_function_makemsg("Zephyr is not available");2030 return(NULL);2031 }2032 /* check for a zcrypt -m */2033 owl_zwrite_create_from_line(&z, buff);2034 if (owl_zwrite_is_message_set(&z)) {2035 owl_function_zcrypt(buff, NULL);2036 owl_zwrite_cleanup(&z);2037 return (NULL);2038 }2039 owl_zwrite_cleanup(&z);2040 2041 if (argc < 2) {2042 owl_function_makemsg("Not enough arguments to the zcrypt command.");2043 } else {2044 owl_function_zwrite_setup(buff);2045 }2046 return(NULL);2047 }2048 2049 2029 char *owl_command_reply(int argc, const char *const *argv, const char *buff) 2050 2030 { … … 2184 2164 argc--; 2185 2165 argv++; 2186 } else if (!strcmp(argv[0], "-r")) {2187 const char *foo;2188 foo=owl_function_create_negative_filter(owl_view_get_filtname(owl_global_get_current_view(&g)));2189 owl_function_change_currentview_filter(foo);2190 2166 } else if (!strcmp(argv[0], "-s")) { 2191 2167 if (argc<2) {
Note: See TracChangeset
for help on using the changeset viewer.