Update of /project/net-nittin-irc/cvsroot/net-nittin-irc In directory common-lisp.net:/tmp/cvs-serv24735
Modified Files: event.lisp protocol.lisp Log Message: I let net-nittin-irc listen to a couple of channels on freenode over the night and it blew up after four hours. change-nickname didn't work the way I thought it would, apparently, but I'm not sure it's still fixed.
Date: Tue Nov 25 08:04:33 2003 Author: eenge
Index: net-nittin-irc/event.lisp diff -u net-nittin-irc/event.lisp:1.13 net-nittin-irc/event.lisp:1.14 --- net-nittin-irc/event.lisp:1.13 Mon Nov 24 22:56:06 2003 +++ net-nittin-irc/event.lisp Tue Nov 25 08:04:33 2003 @@ -1,4 +1,4 @@ -;;;; $Id: event.lisp,v 1.13 2003/11/25 03:56:06 eenge Exp $ +;;;; $Id: event.lisp,v 1.14 2003/11/25 13:04:33 eenge Exp $ ;;;; $Source: /project/net-nittin-irc/cvsroot/net-nittin-irc/event.lisp,v $
;;;; See LICENSE for licensing information. @@ -48,7 +48,8 @@ :username (user message) :hostname (host message)))) (unless (equal user (user connection)) - (add-user connection channel user)))))) + (add-user connection user) + (add-user channel user))))))
(defmethod default-hook ((message irc-ping-message)) (pong (connection message) (trailing-argument message))) @@ -64,7 +65,9 @@ (make-channel :name (trailing-argument message))))) (if (self-message-p message) (add-channel connection channel) - (add-user connection channel user)))) + (progn + (add-user connection user) + (add-user channel user)))))
(defmethod default-hook ((message irc-topic-message)) (setf (topic (find-channel (connection message)
Index: net-nittin-irc/protocol.lisp diff -u net-nittin-irc/protocol.lisp:1.21 net-nittin-irc/protocol.lisp:1.22 --- net-nittin-irc/protocol.lisp:1.21 Mon Nov 24 22:56:06 2003 +++ net-nittin-irc/protocol.lisp Tue Nov 25 08:04:33 2003 @@ -1,4 +1,4 @@ -;;;; $Id: protocol.lisp,v 1.21 2003/11/25 03:56:06 eenge Exp $ +;;;; $Id: protocol.lisp,v 1.22 2003/11/25 13:04:33 eenge Exp $ ;;;; $Source: /project/net-nittin-irc/cvsroot/net-nittin-irc/protocol.lisp,v $
;;;; See LICENSE for licensing information. @@ -397,12 +397,14 @@ (user connection)))))
; what if the user is not on any channels? -(defmethod add-user ((connection connection) (channel channel) (user user)) - "Add `user' to `channel' and `channel' to `user'." - (setf (gethash (normalized-nickname user) (users channel)) user) - (pushnew channel (channels user)) +(defmethod add-user ((connection connection) (user user)) + "Add `user' to `connection'." (setf (gethash (normalized-nickname user) (users connection)) user))
+(defmethod add-user ((channel channel) (user user)) + (setf (gethash (normalized-nickname user) (users channel)) user) + (pushnew channel (channels user))) + (defmethod remove-all-users ((connection connection)) "Remove all users known to `connection'." (clrhash (users connection))) @@ -443,7 +445,9 @@ (setf (normalized-nickname new-user) (normalize-nickname new-nickname)) (dolist (channel channels) (remove-user channel user) - (add-user connection channel new-user)))) + (add-user channel new-user)) + (add-user connection user) + new-user))
;; IRC Message ;;