Beirc as it is right now uses a really ugly re-implementation of the read-message method, because in order to operate correctly, we can't just use an :around method on read-message like this:
It's great to hear from a library user for once ! :-)
(defmethod read-message ((con my-irc-connection)) (let ((m (call-next-method))) (dispatch-on-message m) m))
Why? Because (in the case of a QUIT message) read-message modified the channel user table already when beirc tries to find out which channels a user who just quit was on.
Good point.
So, I think we're specializing a method one level too high. We should be specializing the irc-message-event method, but it has no connection argument. Yet.
Well, now it does :-)
The attached patch adds a connection argument on which irc-message-event can be specialized. I would also suggest exporting irc-message-event and making that method the recommended way to dispatch on all messages on an irc connection.
Thanks for your contribution! anonymous CVS should lag a bit, but the change is in.
bye,
Erik.