]> gitweb.factorcode.org Git - factor.git/commitdiff
irc.client: Fix listeners-with-participant
authorBruno Deferrari <utizoc@gmail.com>
Tue, 30 Sep 2008 06:00:48 +0000 (03:00 -0300)
committerBruno Deferrari <utizoc@gmail.com>
Tue, 30 Sep 2008 06:00:48 +0000 (03:00 -0300)
extra/irc/client/client.factor

index ca16ff3b887eb2f3c47d97f192de29d130571352..606a8206da3cd4a30d4ed775442f1e8d3f12946e 100755 (executable)
@@ -67,6 +67,7 @@ SINGLETON: irc-listener-end ! send to a listener to stop its execution
 SINGLETON: irc-end          ! sent when the client isn't running anymore
 SINGLETON: irc-disconnected ! sent when connection is lost
 SINGLETON: irc-connected    ! sent when connection is established
+SINGLETON: irc-ready        ! sent after the client is logged in
 
 : terminate-irc ( irc-client -- )
     [ is-running>> ] keep and [
@@ -115,7 +116,7 @@ M: irc-listener to-listener in-messages>> mailbox-put ;
 
 : listeners-with-participant ( nick -- seq )
     irc> listeners>> values
-    [ [ irc-channel-listener? ] keep and [ participants>> key? ] when* ]
+    [ [ irc-channel-listener? ] keep and [ participants>> key? ] [ drop f ] if* ]
     with filter ;
 
 : to-listeners-with-participant ( message nickname -- )