- A591AF341FF436F6A3391AA5163F6BC366358B719427154F88815D87213798C92EAE4923E6BE147B92C04562619564D7A64AD9AC51CA08E5165B0B4B3DA9813A
+ 6ED286AA5D94E22E9087ABB55E14F7BB7EB0B098E490B0D4D6B6118BB72665C220910D24F957AC0E096A035E59A5BA3BB81AB63552010727D40AC7B8B4A2D8BB
ircbot/ircbot.lisp
(6 . 7)(6 . 7)
5
6 (defclass ircbot ()
7 ((connection :accessor ircbot-connection :initform nil)
8 (channel :reader ircbot-channel :initarg :channel)
9 (channels :reader ircbot-channels :initarg :channels)
10 (server :reader ircbot-server :initarg :server)
11 (port :reader ircbot-port :initarg :port)
12 (nick :reader ircbot-nick :initarg :nick)
(42 . 8)(42 . 9)
14 (ircbot-randomize-nick bot)))
15 (add-hook conn 'irc-kick-message (lambda (message)
16 (declare (ignore message))
17 (join (ircbot-connection bot)
18 (ircbot-channel bot))))
19 (map nil
20 (lambda (c) (join (ircbot-connection bot) c))
21 (ircbot-channels bot))))
22 (add-hook conn 'irc-notice-message (lambda (message)
23 (ircbot-handle-nickserv bot message)))
24 (add-hook conn 'irc-pong-message (lambda (message)
(85 . 7)(86 . 7)
26 ((string= msgtext (format nil "~A is not online." (ircbot-nick bot)))
27 (ircbot-nickserv-auth bot))
28 ((string= msgtext (format nil "You are now identified for ~A." (ircbot-nick bot)))
29 (join conn (ircbot-channel bot))))))))
30 (map nil (lambda (c) (join conn c)) (ircbot-channels bot))))))))
31
32 (defmethod ircbot-handle-pong ((bot ircbot) message)
33 (destructuring-bind (server ping) (arguments message)