Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r987cf3f r7ba9e0de  
    106106  OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE,
    107107              "send a zephyr",
    108               "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [<user> ...] [-m <message...>]",
     108              "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcde] [<user> ...] [-m <message...>]",
    109109              "Zwrite send a zephyr to the one or more users specified.\n\n"
    110110              "The following options are available:\n\n"
     
    136136              "Send a local message.\n"),
    137137
    138   OWLCMD_ARGS("zcrypt", owl_command_zwrite, OWL_CTX_INTERACTIVE,
     138  OWLCMD_ARGS("zcrypt", owl_command_zcrypt, OWL_CTX_INTERACTIVE,
    139139              "send an encrypted zephyr",
    140               "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\n",
     140              "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcde] [-m <message...>]\n",
    141141              "Behaves like zwrite but uses encryption.  Not for use with\n"
    142142              "personal messages\n"),
     
    148148              "allow editing.\n\n"
    149149              "If 'sender' is specified, reply to the sender.\n\n"
    150               "If 'all' or no args are specified, reply publicly to the\n"
     150              "If 'all' or no args are specified, reply publically to the\n"
    151151              "same class/instance for non-personal messages and to the\n"
    152152              "sender for personal messages.\n\n"
     
    266266              "zpunt <class> <instance> [recipient]\n"
    267267              "zpunt <instance>",
    268               "The zpunt command will suppress messages to the specified\n"
     268              "The zpunt command will supress message to the specified\n"
    269269              "zephyr triplet.  In the second usage messages are suppressed\n"
    270270              "for class MESSAGE and the named instance.\n\n"
     
    283283              "punt <filter-text>",
    284284              "punt <filter-text (multiple words)>\n"
    285               "The punt command will suppress messages to the specified\n"
     285              "The punt command will supress message to the specified\n"
    286286              "filter\n\n"
    287287              "SEE ALSO:  unpunt, zpunt, show zpunts\n"),
     
    586586              "name style after the -s argument.\n"
    587587              "\n"
    588               "The other usages listed above are abbreviated forms that simply set\n"
     588              "The other usages listed above are abbreivated forms that simply set\n"
    589589              "the filter of the current view. The -d option allows you to write a\n"
    590590              "filter expression that will be dynamically created by owl and then\n"
     
    594594  OWLCMD_ARGS("smartnarrow", owl_command_smartnarrow, OWL_CTX_INTERACTIVE,
    595595              "view only messages similar to the current message",
    596               "smartnarrow [-i | --instance]  [-r | --related]",
     596              "smartnarrow [-i | --instance]  [-r | --relatde]",
    597597              "If the curmsg is a personal message narrow\n"
    598598              "   to the conversation with that user.\n"
     
    614614              "   message, the filter is to that instance.\n"
    615615              "If the curmsg is a class message, the filter is that class.\n"
    616               "If the curmsg is a class message and '-i' is specified\n"
     616              "If the curmsg is a class message and '-i' is specied\n"
    617617              "    the filter is to that class and instance.\n"),
    618618
     
    674674              "for formatting messages.\n\n"
    675675              "Show variables will list the names of all variables.\n\n"
    676               "Show errors will show a list of errors encountered by Owl.\n\n"
     676              "Show errors will show a list of errors ecountered by Owl.\n\n"
    677677              "SEE ALSO: filter, view, alias, bindkey, help\n"),
    678678 
     
    743743              "set the search highlight string without searching",
    744744              "setsearch <string>",
    745               "The setsearch command highlights all occurrences of its\n"
     745              "The setsearch command highlights all occurences of its\n"
    746746          "argument and makes it the default argument for future\n"
    747747          "search commands, but does not move the cursor.  With\n"
     
    19141914char *owl_command_zwrite(int argc, const char *const *argv, const char *buff)
    19151915{
    1916   owl_zwrite *z;
     1916  owl_zwrite z;
    19171917
    19181918  if (!owl_global_is_havezephyr(&g)) {
     
    19211921  }
    19221922  /* check for a zwrite -m */
    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   }
     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);
    19341930
    19351931  if (argc < 2) {
    1936     owl_zwrite_delete(z);
    19371932    owl_function_makemsg("Not enough arguments to the zwrite command.");
    19381933  } else {
    1939     owl_function_zwrite_setup(z);
     1934    owl_function_zwrite_setup(buff);
    19401935  }
    19411936  return(NULL);
     
    20272022}
    20282023
     2024char *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
    20292049char *owl_command_reply(int argc, const char *const *argv, const char *buff)
    20302050{
     
    21642184      argc--;
    21652185      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);
    21662190    } else if (!strcmp(argv[0], "-s")) {
    21672191      if (argc<2) {
Note: See TracChangeset for help on using the changeset viewer.