;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315DD\316\317\320%\210\311\321\313\314\322DD\323\317\320%\210\311\324\313\314\325DD\326\317\320%\210\327\330\331\"\207" [require chess chess-network custom-declare-group chess-irc nil "Use an IRC bot for sending/receiving moves." :group chess-engine custom-declare-variable chess-irc-server funcall function #[0 "\300\207" [#1="irc.openprojects.net"] 1 #1#] "The IRC host to connect your chess-irc engine to." :type string chess-irc-port #[0 "\300\207" [6667] 1] "The port of the IRC host specified by `chess-irc-server'." chess-irc-nick #[0 "\300 \207" [user-login-name] 1] "The nick you wish to use for sending/receiving IRC chess moves." chess-message-catalog english ((opponent-says . "Your opponent says: %s") (irc-connecting . "Connecting to IRC server '%s:%d'...") (irc-logging-in . "Connected, now logging in as '%s'...") (irc-waiting . "Now waiting for 'name USER' via /msg, or `M-x chess-irc-engage'") (irc-challenge . "IRC nick of user to challenge: "))] 6) (defvar chess-irc-regexp-alist (byte-code "\301\302\303BC\"\207" [chess-network-regexp-alist append ".+" #[0 "\300\301\302!C\303\304\305#!\207" [opponent-says match-string 0 message apply chess-string] 7]] 4)) (defvar chess-irc-working nil) (defvar chess-irc-last-pos nil) (defvar chess-irc-use-ctcp nil) (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [make-variable-buffer-local chess-irc-process chess-irc-engine chess-irc-opponent chess-irc-working chess-irc-last-pos chess-irc-use-ctcp] 2) #@79 This is an example of a generic transport engine. (fn GAME EVENT &rest ARGS) (defalias 'chess-irc-handler #[642 "?\205\274\306\267\202\266\307 \nD\310\311\312#!\266p\313r\314\315!q\210\316\317p \n$\262\320\fC\310\311\312#!\266\211\203v\321!\203v\322!\323=\203v\324\325\326\327 #\"\210\324\325\330\f\"\"\210\331\332\"\210\333p\"\210\334!`\313\223\210\335\313\310\311\312#!\266)*\210\336\207\337\312\340!!+\341\342+\"\207\343\313\344\"\210\324*\345\"\210\346\347*!!\207\324*,\203\255\325\350+@#\202\264\325\351+@#\"\207\311\341$\207" [chess-engine-handling-event chess-irc-server chess-irc-port chess-irc-engine chess-irc-nick chess-full-name #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (initialize 11 match 124 destroy 137 send 155)) irc-connecting message apply chess-string nil generate-new-buffer " *chess-irc*" open-network-stream "*chess-irc*" irc-logging-in processp process-status open process-send-string format "USER %s 0 * :%s\n" user-login-name "NICK %s\n" set-process-filter chess-irc-filter set-process-buffer process-mark irc-waiting t read-string irc-challenge chess-network-handler match chess-engine-send "quit" "QUIT :Goodbye\n" kill-buffer process-buffer "PRIVMSG %s :CHESS %s\n" "PRIVMSG %s :%s\n" chess-irc-process chess-irc-opponent chess-irc-use-ctcp] 12 (#$ . 1682)]) #@20 (fn PROC STRING) (defalias 'chess-irc-filter #[514 "\306!\307!\205\255r\211q\210`\310!U\212\310!b\210\311\312\"\203+\313\314\315\211$\262\202c\210\310!`\316\223\210)\211\203?\310!b\210\210?\205\254\315\317\216 \203S b\210\202Veb\210\320 \210m?\205\253\321\322!\203\245\323\324!\323\325!\323\326!\323\327!r\nq\210 \230\203\242\f\203\204\f\230\203\242\f\204\212 \204\233\203\233G\330V\203\233\315\331\316\332P\"\210)\266\316y\210\202Y))\207" [chess-irc-working chess-irc-last-pos chess-irc-engine chess-irc-nick chess-irc-opponent chess-irc-use-ctcp process-buffer buffer-live-p process-mark string-match " " replace-match "" t nil #[0 "`\302\211\207" [chess-irc-last-pos chess-irc-working nil] 2] beginning-of-line looking-at ":\\([^ \n!]+\\)!\\S-+ PRIVMSG \\(\\S-+\\) :\\(CHESS \\)?\\(.+\\)?\n" match-string 1 2 3 4 0 chess-engine-submit "\n"] 11 (#$ . 3066)]) (provide 'chess-irc)