irc.*: removing more EXCLUDE: (#1839)
							parent
							
								
									89473cc048
								
							
						
					
					
						commit
						7c22d09f47
					
				| 
						 | 
					@ -1,12 +1,9 @@
 | 
				
			||||||
! Copyright (C) 2009 Bruno Deferrari
 | 
					! Copyright (C) 2009 Bruno Deferrari
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! See http://factorcode.org/license.txt for BSD license.
 | 
				
			||||||
USING: kernel tools.test accessors arrays sequences
 | 
					USING: accessors assocs calendar classes combinators
 | 
				
			||||||
io io.streams.duplex namespaces threads destructors
 | 
					concurrency.mailboxes destructors io io.streams.duplex irc.client.base
 | 
				
			||||||
calendar concurrency.mailboxes classes assocs combinators
 | 
					irc.client.chats irc.client.internals irc.client.participants
 | 
				
			||||||
irc.messages.parser irc.client.base irc.client.chats
 | 
					irc.messages irc.messages.parser kernel sequences threads tools.test ;
 | 
				
			||||||
irc.client.participants irc.client.internals ;
 | 
					 | 
				
			||||||
EXCLUDE: irc.messages => join ;
 | 
					 | 
				
			||||||
RENAME: join irc.messages => join_
 | 
					 | 
				
			||||||
IN: irc.client.internals.tests
 | 
					IN: irc.client.internals.tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
! Streams for testing
 | 
					! Streams for testing
 | 
				
			||||||
| 
						 | 
					@ -113,7 +110,7 @@ M: mb-writer dispose drop ;
 | 
				
			||||||
  ] unit-test
 | 
					  ] unit-test
 | 
				
			||||||
] spawning-irc
 | 
					] spawning-irc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ { join_ "#factortest" } [
 | 
					[ { irc.messages:join "#factortest" } [
 | 
				
			||||||
      "#factortest" <irc-channel-chat> [ %add-named-chat ] keep
 | 
					      "#factortest" <irc-channel-chat> [ %add-named-chat ] keep
 | 
				
			||||||
      { ":factorbot!n=factorbo@some.where JOIN :#factortest"
 | 
					      { ":factorbot!n=factorbo@some.where JOIN :#factortest"
 | 
				
			||||||
        ":ircserver.net 353 factorbot @ #factortest :@factorbot "
 | 
					        ":ircserver.net 353 factorbot @ #factortest :@factorbot "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,7 @@
 | 
				
			||||||
USING: accessors assocs arrays concurrency.mailboxes continuations destructors
 | 
					USING: accessors assocs arrays concurrency.mailboxes continuations destructors
 | 
				
			||||||
hashtables io irc.client.base irc.client.chats irc.messages kernel namespaces
 | 
					hashtables io irc.client.base irc.client.chats irc.messages kernel namespaces
 | 
				
			||||||
strings words.symbol irc.messages.base irc.client.participants fry threads
 | 
					strings words.symbol irc.messages.base irc.client.participants fry threads
 | 
				
			||||||
combinators irc.messages.parser math ;
 | 
					combinators irc.messages.parser math sequences ;
 | 
				
			||||||
EXCLUDE: sequences => join ;
 | 
					 | 
				
			||||||
IN: irc.client.internals
 | 
					IN: irc.client.internals
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: do-connect ( server port quot: ( host port -- stream ) attempts -- stream/f )
 | 
					: 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: object process-message drop ;
 | 
				
			||||||
M: ping   process-message trailing>> /PONG ;
 | 
					M: ping   process-message trailing>> /PONG ;
 | 
				
			||||||
! FIXME: it shouldn't be checking for the presence of chat here...
 | 
					! 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: part   process-message [ sender>> ] [ chat> ] bi [ part-participant ] [ drop ] if* ;
 | 
				
			||||||
M: quit   process-message sender>> quit-participant ;
 | 
					M: quit   process-message sender>> quit-participant ;
 | 
				
			||||||
M: nick   process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;
 | 
					M: nick   process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,7 @@
 | 
				
			||||||
! Copyright (C) 2009 Bruno Deferrari.
 | 
					! Copyright (C) 2009 Bruno Deferrari.
 | 
				
			||||||
! See http://factorcode.org/license.txt for BSD license.
 | 
					! See http://factorcode.org/license.txt for BSD license.
 | 
				
			||||||
USING: accessors irc.messages irc.messages.base kernel make
 | 
					USING: accessors irc.messages irc.messages.base kernel make
 | 
				
			||||||
combinators ;
 | 
					combinators sequences ;
 | 
				
			||||||
EXCLUDE: sequences => join ;
 | 
					 | 
				
			||||||
IN: irc.logbot.log-line
 | 
					IN: irc.logbot.log-line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: dot-or-parens ( string -- string )
 | 
					: dot-or-parens ( string -- string )
 | 
				
			||||||
| 
						 | 
					@ -24,7 +23,7 @@ M: privmsg >log-line
 | 
				
			||||||
: prefix% ( string -- )
 | 
					: prefix% ( string -- )
 | 
				
			||||||
    " [" % % "]" % ;
 | 
					    " [" % % "]" % ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: join >log-line
 | 
					M: irc.messages:join >log-line
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        [ "* " % sender>> % ]
 | 
					        [ "* " % sender>> % ]
 | 
				
			||||||
        [ prefix>> prefix% " has joined the channel." % ] bi
 | 
					        [ prefix>> prefix% " has joined the channel." % ] bi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue