mcabber/mcabber/commands.c
changeset 1972 45f0f0f60656
parent 1959 ed97057f0881
child 1976 e6beab22099b
equal deleted inserted replaced
1971:7ea4342044ef 1972:45f0f0f60656
    45 
    45 
    46 #define IMSTATUS_AWAY           "away"
    46 #define IMSTATUS_AWAY           "away"
    47 #define IMSTATUS_ONLINE         "online"
    47 #define IMSTATUS_ONLINE         "online"
    48 #define IMSTATUS_OFFLINE        "offline"
    48 #define IMSTATUS_OFFLINE        "offline"
    49 #define IMSTATUS_FREE4CHAT      "free"
    49 #define IMSTATUS_FREE4CHAT      "free"
    50 #define IMSTATUS_INVISIBLE      "invisible"
       
    51 #define IMSTATUS_AVAILABLE      "avail"
    50 #define IMSTATUS_AVAILABLE      "avail"
    52 #define IMSTATUS_NOTAVAILABLE   "notavail"
    51 #define IMSTATUS_NOTAVAILABLE   "notavail"
    53 #define IMSTATUS_DONOTDISTURB   "dnd"
    52 #define IMSTATUS_DONOTDISTURB   "dnd"
       
    53 #ifdef WITH_DEPRECATED_STATUS_INVISIBLE
       
    54 # define IMSTATUS_INVISIBLE      "invisible"
       
    55 #endif
    54 
    56 
    55 // Return value container for the following functions
    57 // Return value container for the following functions
    56 static int retval_for_cmds;
    58 static int retval_for_cmds;
    57 
    59 
    58 // Commands callbacks
    60 // Commands callbacks
   194   cmd_add("version", "Show mcabber version", 0, 0, &do_version, NULL);
   196   cmd_add("version", "Show mcabber version", 0, 0, &do_version, NULL);
   195 
   197 
   196   // Status category
   198   // Status category
   197   compl_add_category_word(COMPL_STATUS, "online");
   199   compl_add_category_word(COMPL_STATUS, "online");
   198   compl_add_category_word(COMPL_STATUS, "avail");
   200   compl_add_category_word(COMPL_STATUS, "avail");
       
   201 #ifdef WITH_DEPRECATED_STATUS_INVISIBLE
   199   compl_add_category_word(COMPL_STATUS, "invisible");
   202   compl_add_category_word(COMPL_STATUS, "invisible");
       
   203 #endif
   200   compl_add_category_word(COMPL_STATUS, "free");
   204   compl_add_category_word(COMPL_STATUS, "free");
   201   compl_add_category_word(COMPL_STATUS, "dnd");
   205   compl_add_category_word(COMPL_STATUS, "dnd");
   202   compl_add_category_word(COMPL_STATUS, "notavail");
   206   compl_add_category_word(COMPL_STATUS, "notavail");
   203   compl_add_category_word(COMPL_STATUS, "away");
   207   compl_add_category_word(COMPL_STATUS, "away");
   204   compl_add_category_word(COMPL_STATUS, "offline");
   208   compl_add_category_word(COMPL_STATUS, "offline");
   886 
   890 
   887   if      (!strcasecmp(status, IMSTATUS_OFFLINE))       st = offline;
   891   if      (!strcasecmp(status, IMSTATUS_OFFLINE))       st = offline;
   888   else if (!strcasecmp(status, IMSTATUS_ONLINE))        st = available;
   892   else if (!strcasecmp(status, IMSTATUS_ONLINE))        st = available;
   889   else if (!strcasecmp(status, IMSTATUS_AVAILABLE))     st = available;
   893   else if (!strcasecmp(status, IMSTATUS_AVAILABLE))     st = available;
   890   else if (!strcasecmp(status, IMSTATUS_AWAY))          st = away;
   894   else if (!strcasecmp(status, IMSTATUS_AWAY))          st = away;
       
   895 #ifdef WITH_DEPRECATED_STATUS_INVISIBLE
   891   else if (!strcasecmp(status, IMSTATUS_INVISIBLE))     st = invisible;
   896   else if (!strcasecmp(status, IMSTATUS_INVISIBLE))     st = invisible;
       
   897 #endif
   892   else if (!strcasecmp(status, IMSTATUS_DONOTDISTURB))  st = dontdisturb;
   898   else if (!strcasecmp(status, IMSTATUS_DONOTDISTURB))  st = dontdisturb;
   893   else if (!strcasecmp(status, IMSTATUS_NOTAVAILABLE))  st = notavail;
   899   else if (!strcasecmp(status, IMSTATUS_NOTAVAILABLE))  st = notavail;
   894   else if (!strcasecmp(status, IMSTATUS_FREE4CHAT))     st = freeforchat;
   900   else if (!strcasecmp(status, IMSTATUS_FREE4CHAT))     st = freeforchat;
   895   else if (!strcasecmp(status, "message")) {
   901   else if (!strcasecmp(status, "message")) {
   896     if (!msg || !*msg) {
   902     if (!msg || !*msg) {