(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)