Fix sending of messages from kibitz or c-shout chat
[xboard.git] / dialogs.c
index 0377031..63dff6a 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -1923,7 +1923,7 @@ IcsHist (int n, Option *opt, DialogClass dlg)
         while(!dirty[chat = (chat + 1)%MAX_CHAT]) if(chat == start) break;
        if(!dirty[chat])
         while(!chatPartner[chat = (chat + 1)%MAX_CHAT][0]) if(chat == start) break;
-       if(chat == start && hidden) chat = 0; // if all unused, start left
+       if(chat == start && hidden) break; // if all unused, ignore
         ChatSwitch(chat + 1);
        break;
       case 1:
@@ -1979,6 +1979,10 @@ ChatOK (int n)
              snprintf(buf, MSG_SIZ, "whisper %s\n", line); // WHISPER box uses "whisper" to send
        else if(!strcmp("shouts", chatPartner[activePartner]))
              snprintf(buf, MSG_SIZ, "shout %s\n", line); // SHOUT box uses "shout" to send
+       else if(!strcmp("c-shouts", chatPartner[activePartner]))
+             snprintf(buf, MSG_SIZ, "cshout %s\n", line); // C-SHOUT box uses "cshout" to send
+       else if(!strcmp("kibitzes", chatPartner[activePartner]))
+             snprintf(buf, MSG_SIZ, "kibitz %s\n", line); // KIBITZ box uses "kibitz" to send
        else {
            if(!atoi(chatPartner[activePartner])) {
                snprintf(buf, MSG_SIZ, "> %s\n", line); // echo only tells to handle, not channel