Changeset 987cf3f for commands.c
- Timestamp:
- Jul 4, 2010, 12:15:12 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- efc460e
- Parents:
- aeadc74
- git-author:
- Nelson Elhage <nelhage@mit.edu> (06/20/10 16:47:23)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/04/10 12:15:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r89ce405 r987cf3f 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 140 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\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); … … 2019 2024 { 2020 2025 owl_function_loopwrite_setup(); 2021 return(NULL);2022 }2023 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 2026 return(NULL); 2047 2027 }
Note: See TracChangeset
for help on using the changeset viewer.