changeset 838:ea1204c8a30b

Add "/msay toggle_verbatim"
author Mikael Berthe <mikael@lilotux.net>
date Thu, 04 May 2006 18:49:10 +0200
parents 7c74eef1d0e0
children 5759770c1968
files mcabber/src/commands.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/commands.c	Thu May 04 18:39:25 2006 +0200
+++ b/mcabber/src/commands.c	Thu May 04 18:49:10 2006 +0200
@@ -167,6 +167,7 @@
   compl_add_category_word(COMPL_MULTILINE, "send");
   compl_add_category_word(COMPL_MULTILINE, "send_to");
   compl_add_category_word(COMPL_MULTILINE, "toggle");
+  compl_add_category_word(COMPL_MULTILINE, "toggle_verbatim");
   compl_add_category_word(COMPL_MULTILINE, "verbatim");
 
   // Room category
@@ -802,6 +803,11 @@
       subcmd = "send";
     else
       subcmd = "begin";
+  } else if (!strcasecmp(subcmd, "toggle_verbatim")) {
+    if (scr_get_multimode())
+      subcmd = "send";
+    else
+      subcmd = "verbatim";
   }
 
   if (!strcasecmp(subcmd, "abort")) {