]> code.delx.au - gnu-emacs-elpa/blobdiff - chess-network.el
Try to improve the promotion situation on ICS by allowing chess-ply to query for...
[gnu-emacs-elpa] / chess-network.el
index 18f1c5860121472df8e092ec766d98012f053cb6..efc9d280a403fe64cef8d5aa9db307e4764e5344 100644 (file)
@@ -52,7 +52,7 @@
         (function
          (lambda ()
            (funcall chess-engine-response-handler 'undo
-                    (string-to-int (match-string 1))))))
+                    (string-to-number (match-string 1))))))
    (cons "accept\\(\\s-+\\(.+\\)\\)?$"
         (function
          (lambda ()
                  (if (fboundp 'open-network-stream-server)
                      (open-network-stream-server "*chess-network*"
                                                  (current-buffer)
-                                                 (read-string "Port: "))
+                                                 (string-to-number
+                                                  (read-string "Port: ")))
                    (start-process "*chess-network*"
                                   (current-buffer) "/usr/bin/nc"
                                   "-l" "-p" (read-string "Port: ")))
                (open-network-stream "*chess-network*" (current-buffer)
                                     (read-string "Host: ")
                                     (read-string "Port: "))))
-       (setq chess-network-kind (if (eq which ?s) 'server 'client))
+       (setq chess-engine-process proc
+             chess-network-kind (if (eq which ?s) 'server 'client))
        t))
 
      ((eq event 'ready)                        ; don't set active yet