mcabber/mcabber/commands.c
changeset 2107 1bd9978ed5d0
parent 2074 e04b6dfbb054
child 2108 adfd962e1343
equal deleted inserted replaced
2106:72876dcf9094 2107:1bd9978ed5d0
    37 #include "hbuf.h"
    37 #include "hbuf.h"
    38 #include "utils.h"
    38 #include "utils.h"
    39 #include "settings.h"
    39 #include "settings.h"
    40 #include "events.h"
    40 #include "events.h"
    41 #include "otr.h"
    41 #include "otr.h"
       
    42 #include "carbons.h"
    42 #include "utf8.h"
    43 #include "utf8.h"
    43 #include "xmpp.h"
    44 #include "xmpp.h"
    44 #include "main.h"
    45 #include "main.h"
    45 
    46 
    46 #define IMSTATUS_AWAY           "away"
    47 #define IMSTATUS_AWAY           "away"
    92 static void do_color(char *arg);
    93 static void do_color(char *arg);
    93 static void do_otr(char *arg);
    94 static void do_otr(char *arg);
    94 static void do_otrpolicy(char *arg);
    95 static void do_otrpolicy(char *arg);
    95 static void do_echo(char *arg);
    96 static void do_echo(char *arg);
    96 static void do_module(char *arg);
    97 static void do_module(char *arg);
       
    98 static void do_carbons(char *arg);
    97 
    99 
    98 static void room_bookmark(gpointer bud, char *arg);
   100 static void room_bookmark(gpointer bud, char *arg);
    99 
   101 
   100 // Global variable for the commands list
   102 // Global variable for the commands list
   101 static GSList *Commands;
   103 static GSList *Commands;
   188   cmd_add("authorization", "Manage subscription authorizations",
   190   cmd_add("authorization", "Manage subscription authorizations",
   189           COMPL_AUTH, COMPL_JID, &do_authorization, NULL);
   191           COMPL_AUTH, COMPL_JID, &do_authorization, NULL);
   190   cmd_add("bind", "Add an key binding", 0, 0, &do_bind, NULL);
   192   cmd_add("bind", "Add an key binding", 0, 0, &do_bind, NULL);
   191   cmd_add("buffer", "Manipulate current buddy's buffer (chat window)",
   193   cmd_add("buffer", "Manipulate current buddy's buffer (chat window)",
   192           COMPL_BUFFER, 0, &do_buffer, NULL);
   194           COMPL_BUFFER, 0, &do_buffer, NULL);
       
   195   cmd_add("carbons", "Mange carbons settings", COMPL_CARBONS, 0, &do_carbons, NULL);
   193   cmd_add("chat_disable", "Disable chat mode", 0, 0, &do_chat_disable, NULL);
   196   cmd_add("chat_disable", "Disable chat mode", 0, 0, &do_chat_disable, NULL);
   194   cmd_add("clear", "Clear the dialog window", 0, 0, &do_clear, NULL);
   197   cmd_add("clear", "Clear the dialog window", 0, 0, &do_clear, NULL);
   195   cmd_add("color", "Set coloring options", COMPL_COLOR, 0, &do_color, NULL);
   198   cmd_add("color", "Set coloring options", COMPL_COLOR, 0, &do_color, NULL);
   196   cmd_add("connect", "Connect to the server", 0, 0, &do_connect, NULL);
   199   cmd_add("connect", "Connect to the server", 0, 0, &do_connect, NULL);
   197   cmd_add("del", "Delete the current buddy", 0, 0, &do_del, NULL);
   200   cmd_add("del", "Delete the current buddy", 0, 0, &do_del, NULL);
   388   compl_add_category_word(COMPL_MODULE, "info");
   391   compl_add_category_word(COMPL_MODULE, "info");
   389   compl_add_category_word(COMPL_MODULE, "list");
   392   compl_add_category_word(COMPL_MODULE, "list");
   390   compl_add_category_word(COMPL_MODULE, "load");
   393   compl_add_category_word(COMPL_MODULE, "load");
   391   compl_add_category_word(COMPL_MODULE, "unload");
   394   compl_add_category_word(COMPL_MODULE, "unload");
   392 #endif
   395 #endif
       
   396 
       
   397   // Carbons category
       
   398   compl_add_category_word(COMPL_CARBONS, "info");
       
   399   compl_add_category_word(COMPL_CARBONS, "enable");
       
   400   compl_add_category_word(COMPL_CARBONS, "disable");
   393 }
   401 }
   394 
   402 
   395 //  expandalias(line)
   403 //  expandalias(line)
   396 // If there is one, expand the alias in line and returns a new allocated line
   404 // If there is one, expand the alias in line and returns a new allocated line
   397 // If no alias is found, returns line
   405 // If no alias is found, returns line
  4149 {
  4157 {
  4150   if (arg)
  4158   if (arg)
  4151     scr_print_logwindow(arg);
  4159     scr_print_logwindow(arg);
  4152 }
  4160 }
  4153 
  4161 
       
  4162 static void do_carbons(char *arg)
       
  4163 {
       
  4164   if (!strcasecmp(arg, "info")) {
       
  4165     carbons_info();
       
  4166   } else if (!strcasecmp(arg, "enable")) {
       
  4167 
       
  4168   } else if (!strcasecmp(arg, "disable")) {
       
  4169 
       
  4170   }
       
  4171 }
       
  4172 
  4154 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */
  4173 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */