From: Bruno Deferrari Date: Fri, 20 Mar 2009 13:15:13 +0000 (-0300) Subject: irc.client: Make to-chat work with sequences X-Git-Tag: 0.94~2141^2~7 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=93a3c18c59b99ec86be5f5d52e9e853eaed4e6eb irc.client: Make to-chat work with sequences --- diff --git a/extra/irc/client/client.factor b/extra/irc/client/client.factor index c7e90eb802..ee46cd954a 100755 --- a/extra/irc/client/client.factor +++ b/extra/irc/client/client.factor @@ -104,6 +104,7 @@ M: string to-chat [ to-chat ] [ drop ] if* ; M: irc-chat to-chat in-messages>> mailbox-put ; +M: sequence to-chat [ to-chat ] with each ; : unregister-chat ( name -- ) irc> chats>> @@ -123,9 +124,6 @@ M: irc-chat to-chat in-messages>> mailbox-put ; [ dup irc-channel-chat? [ participants>> key? ] [ 2drop f ] if ] with filter ; -: to-chats-with-participant ( message nickname -- ) - chats-with-participant [ to-chat ] with each ; - : remove-participant-from-all ( nick -- ) dup chats-with-participant [ (remove-participant) ] with each ; @@ -199,7 +197,7 @@ M: irc-message forward-message M: single-forward forward-message dup forward-name to-chat ; M: multiple-forward forward-message - dup sender>> to-chats-with-participant ; + dup sender>> chats-with-participant to-chat ; M: broadcast-forward forward-message irc> chats>> values [ to-chat ] with each ;