irc.client: Make to-chat work with sequences
parent
f3577572ec
commit
93a3c18c59
|
@ -104,6 +104,7 @@ M: string to-chat
|
||||||
[ to-chat ] [ drop ] if* ;
|
[ to-chat ] [ drop ] if* ;
|
||||||
|
|
||||||
M: irc-chat to-chat in-messages>> mailbox-put ;
|
M: irc-chat to-chat in-messages>> mailbox-put ;
|
||||||
|
M: sequence to-chat [ to-chat ] with each ;
|
||||||
|
|
||||||
: unregister-chat ( name -- )
|
: unregister-chat ( name -- )
|
||||||
irc> chats>>
|
irc> chats>>
|
||||||
|
@ -123,9 +124,6 @@ M: irc-chat to-chat in-messages>> mailbox-put ;
|
||||||
[ dup irc-channel-chat? [ participants>> key? ] [ 2drop f ] if ]
|
[ dup irc-channel-chat? [ participants>> key? ] [ 2drop f ] if ]
|
||||||
with filter ;
|
with filter ;
|
||||||
|
|
||||||
: to-chats-with-participant ( message nickname -- )
|
|
||||||
chats-with-participant [ to-chat ] with each ;
|
|
||||||
|
|
||||||
: remove-participant-from-all ( nick -- )
|
: remove-participant-from-all ( nick -- )
|
||||||
dup chats-with-participant [ (remove-participant) ] with each ;
|
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: single-forward forward-message dup forward-name to-chat ;
|
||||||
|
|
||||||
M: multiple-forward forward-message
|
M: multiple-forward forward-message
|
||||||
dup sender>> to-chats-with-participant ;
|
dup sender>> chats-with-participant to-chat ;
|
||||||
|
|
||||||
M: broadcast-forward forward-message
|
M: broadcast-forward forward-message
|
||||||
irc> chats>> values [ to-chat ] with each ;
|
irc> chats>> values [ to-chat ] with each ;
|
||||||
|
|
Loading…
Reference in New Issue