X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=a837a86dc31156b4f807ed3dc648607152abde6f;hb=5f05bf2e58fab151886184643c75f9d9b677b0a3;hp=0fd5e08b2282de6ab9c0771396cf34e69c7998f5;hpb=18fc21bfe47cf80d294fffc22eb00d7f4384cd62;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index 0fd5e08..a837a86 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -177,11 +177,15 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam GetDlgItemText(hDlg, OPT_ChatInput, mess, MSG_SIZ); SetDlgItemText(hDlg, OPT_ChatInput, ""); // from here on it could be back-end - if(strcmp("WHISPER", chatPartner[partner])) { - sprintf(buf, "> %s\n", mess); // echo only tells, not whispers + if(!strcmp("WHISPER", chatPartner[partner])) + sprintf(buf, "whisper %s\n", mess); // WHISPER box uses "whisper" to send + else { + if(!atoi(chatPartner[partner])) { + sprintf(buf, "> %s\n", mess); // echo only tells to handle, not channel InsertIntoMemo(hDlg, buf); + } sprintf(buf, "tell %s %s\n", chatPartner[partner], mess); - } else sprintf(buf, "whisper %s\n", mess); // SAY box uses "say" to send + } SendToICS(buf); break;