irc.*: removing more EXCLUDE: (#1839)

modern-harvey2
Björn Lindqvist 2017-07-04 12:02:24 +02:00
parent 89473cc048
commit 7c22d09f47
3 changed files with 11 additions and 14 deletions

View File

@ -1,12 +1,9 @@
! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license.
USING: kernel tools.test accessors arrays sequences
io io.streams.duplex namespaces threads destructors
calendar concurrency.mailboxes classes assocs combinators
irc.messages.parser irc.client.base irc.client.chats
irc.client.participants irc.client.internals ;
EXCLUDE: irc.messages => join ;
RENAME: join irc.messages => join_
USING: accessors assocs calendar classes combinators
concurrency.mailboxes destructors io io.streams.duplex irc.client.base
irc.client.chats irc.client.internals irc.client.participants
irc.messages irc.messages.parser kernel sequences threads tools.test ;
IN: irc.client.internals.tests
! Streams for testing
@ -113,7 +110,7 @@ M: mb-writer dispose drop ;
] unit-test
] spawning-irc
[ { join_ "#factortest" } [
[ { irc.messages:join "#factortest" } [
"#factortest" <irc-channel-chat> [ %add-named-chat ] keep
{ ":factorbot!n=factorbo@some.where JOIN :#factortest"
":ircserver.net 353 factorbot @ #factortest :@factorbot "

View File

@ -3,8 +3,7 @@
USING: accessors assocs arrays concurrency.mailboxes continuations destructors
hashtables io irc.client.base irc.client.chats irc.messages kernel namespaces
strings words.symbol irc.messages.base irc.client.participants fry threads
combinators irc.messages.parser math ;
EXCLUDE: sequences => join ;
combinators irc.messages.parser math sequences ;
IN: irc.client.internals
: do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f )
@ -76,7 +75,9 @@ GENERIC: process-message ( irc-message -- )
M: object process-message drop ;
M: ping process-message trailing>> /PONG ;
! FIXME: it shouldn't be checking for the presence of chat here...
M: join process-message [ sender>> ] [ chat> ] bi [ join-participant ] [ drop ] if* ;
M: irc.messages:join
process-message [ sender>> ] [ chat> ] bi
[ join-participant ] [ drop ] if* ;
M: part process-message [ sender>> ] [ chat> ] bi [ part-participant ] [ drop ] if* ;
M: quit process-message sender>> quit-participant ;
M: nick process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;

View File

@ -1,8 +1,7 @@
! Copyright (C) 2009 Bruno Deferrari.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors irc.messages irc.messages.base kernel make
combinators ;
EXCLUDE: sequences => join ;
combinators sequences ;
IN: irc.logbot.log-line
: dot-or-parens ( string -- string )
@ -24,7 +23,7 @@ M: privmsg >log-line
: prefix% ( string -- )
" [" % % "]" % ;
M: join >log-line
M: irc.messages:join >log-line
[
[ "* " % sender>> % ]
[ prefix>> prefix% " has joined the channel." % ] bi