<commit_before>(eval-when (:compile-toplevel :load-toplevel :execute)
  (declaim (optimize (debug 3))))
(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload :cl-irc))
(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload :cl+ssl))

(defparameter *connection* nil)

(defun part ()
  (when *connection*
    (irc:quit *connection*)
    (setf *connection* nil)))

(defun test ()
  (let (names)
    (flet ((message-received-hook (message)
	     (let* ((arguments (irc:arguments message))
		    (channel (first arguments))
		    (contents (second arguments))
		    (sender (irc:source message)))
	       ;(format t "message received: ~A~%" (irc:arguments message))
	       ;(irc:privmsg *connection* sender (format nil "you said: ~A" contents))
	       (unless names
		 (irc:names *connection* "#bots"))
	       ))
	   (names-hook (message)
	     ()
	     ))
      (unless *connection*
	(setf *connection* (irc:connect :nickname "lispbot" :server "irc.cat.pdx.edu" :port 6697 :connection-security :ssl)))
      (irc:join *connection* "#bots" :password (getf (with-open-file (in "auth.dat") (with-standard-io-syntax (read in))) :key))
      (irc:add-hook *connection* 'irc:irc-privmsg-message #'message-received-hook)
      (irc:add-hook *connection* 'irc:irc-rpl_namreply-message #'names-hook)
      (irc:read-message-loop *connection*)
      )))<commit_msg>Got NAMES capture to work.<commit_after>(eval-when (:compile-toplevel :load-toplevel :execute)
  (declaim (optimize (debug 3))))
(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload :cl-irc))
(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload :cl+ssl))

(defparameter *connection* nil)

(defun part ()
  (when *connection*
    (irc:quit *connection*)
    (setf *connection* nil)))

(defun test ()
  (let (names)
    (flet ((message-received-hook (message)
	     (let* ((arguments (irc:arguments message))
		    (channel (first arguments))
		    (contents (second arguments))
		    (sender (irc:source message)))
	       (if names
		   (progn
		     (print (first (last (irc:arguments names))))
		     (setf names nil)
		     (part))
		 (irc:names *connection* "#bots"))))
	   (names-hook (message)
	     (setf names message)))
      (unless *connection*
	(setf *connection* (irc:connect :nickname "lispbot" :server "irc.cat.pdx.edu" :port 6697 :connection-security :ssl)))
      (irc:join *connection* "#bots" :password (getf (with-open-file (in "auth.dat") (with-standard-io-syntax (read in))) :key))
      (irc:add-hook *connection* 'irc:irc-privmsg-message #'message-received-hook)
      (irc:add-hook *connection* 'irc:irc-rpl_namreply-message #'names-hook)
      (irc:read-message-loop *connection*)
      )))
{'fraction_non_alphanumeric': 0.17086527929901424, 'fraction_numerical': 0.0036509675063891934, 'mean_word_length': 3.823943661971831, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1244098', 'n_tokens_mistral': 1011, 'n_tokens_neox': 913, 'n_words': 221}