use xtell for talking to handles, but tell for talking into a channel.
[xboard.git] / winboard / wchat.c
index a837a86..fbf3e15 100644 (file)
@@ -32,8 +32,8 @@
 #include <dlgs.h>\r
 \r
 #include "common.h"\r
-#include "winboard.h"\r
 #include "frontend.h"\r
+#include "winboard.h"\r
 #include "backend.h"\r
 \r
 #include "wsnap.h"\r
@@ -99,9 +99,7 @@ static void ResizeWindowControls( HWND hDlg )
     int clientHeight;\r
     int maxControlWidth;\r
     int buttonWidth, buttonHeight;\r
-#if 0\r
-}\r
-#else\r
+\r
     /* Initialize variables */\r
     GetClientRect( hDlg, &rc );\r
 \r
@@ -121,7 +119,6 @@ static void ResizeWindowControls( HWND hDlg )
 //    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo1), NULL, FALSE );\r
 //    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo2), NULL, FALSE );\r
 }\r
-#endif\r
 \r
 // front end. Actual printing of PV lines into the output field\r
 static void InsertIntoMemo( HANDLE hDlg, char * text )\r
@@ -183,7 +180,8 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
                if(!atoi(chatPartner[partner])) {\r
                    sprintf(buf, "> %s\n", mess); // echo only tells to handle, not channel\r
                InsertIntoMemo(hDlg, buf);\r
-               }\r
+               sprintf(buf, "xtell %s %s\n", chatPartner[partner], mess);\r
+               } else\r
                sprintf(buf, "tell %s %s\n", chatPartner[partner], mess);\r
            }\r
            SendToICS(buf);\r