mcabber/src/screen.c
changeset 993 0759f4c7da68
parent 992 b37348c2aa79
child 996 f4d6570e2628
equal deleted inserted replaced
992:b37348c2aa79 993:0759f4c7da68
    96 static char   cmdhisto_backup[INPUTLINE_LENGTH+1];
    96 static char   cmdhisto_backup[INPUTLINE_LENGTH+1];
    97 
    97 
    98 static int    chatstate; /* (0=active, 1=composing, 2=paused) */
    98 static int    chatstate; /* (0=active, 1=composing, 2=paused) */
    99 static bool   lock_chatstate;
    99 static bool   lock_chatstate;
   100 static time_t chatstate_timestamp;
   100 static time_t chatstate_timestamp;
       
   101 int chatstates_disabled;
   101 
   102 
   102 #define MAX_KEYSEQ_LENGTH 8
   103 #define MAX_KEYSEQ_LENGTH 8
   103 
   104 
   104 typedef struct {
   105 typedef struct {
   105   char *seqstr;
   106   char *seqstr;
  1395 // Set the current chat state (0=active, 1=composing, 2=paused)
  1396 // Set the current chat state (0=active, 1=composing, 2=paused)
  1396 // If the chat state has changed, call jb_send_chatstate()
  1397 // If the chat state has changed, call jb_send_chatstate()
  1397 static inline void set_chatstate(int state)
  1398 static inline void set_chatstate(int state)
  1398 {
  1399 {
  1399 #if defined JEP0022 || defined JEP0085
  1400 #if defined JEP0022 || defined JEP0085
       
  1401   if (chatstates_disabled)
       
  1402     return;
  1400   if (!chatmode)
  1403   if (!chatmode)
  1401     state = 0;
  1404     state = 0;
  1402   if (state != chatstate) {
  1405   if (state != chatstate) {
  1403     chatstate = state;
  1406     chatstate = state;
  1404     if (current_buddy &&
  1407     if (current_buddy &&