irc.messages: Set timestamp when constructing, not on parser
parent
01f7f560b0
commit
7f5f8185bf
|
|
@ -52,7 +52,7 @@ M: to-all-chats message-forwards drop chats> ;
|
||||||
M: to-many-chats message-forwards sender>> participant-chats ;
|
M: to-many-chats message-forwards sender>> participant-chats ;
|
||||||
|
|
||||||
GENERIC: process-message ( irc-message -- )
|
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 ;
|
||||||
M: join process-message [ sender>> ] [ chat> ] bi join-participant ;
|
M: join process-message [ sender>> ] [ chat> ] bi join-participant ;
|
||||||
M: part process-message [ sender>> ] [ chat> ] bi part-participant ;
|
M: part process-message [ sender>> ] [ chat> ] bi part-participant ;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
! 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 arrays assocs classes.parser classes.tuple
|
USING: accessors arrays assocs calendar classes.parser classes.tuple
|
||||||
combinators fry generic.parser kernel lexer
|
combinators fry generic.parser kernel lexer
|
||||||
mirrors namespaces parser sequences splitting strings words ;
|
mirrors namespaces parser sequences splitting strings words ;
|
||||||
IN: irc.messages.base
|
IN: irc.messages.base
|
||||||
|
|
@ -51,6 +51,7 @@ M: irc-message post-process-irc-message drop ;
|
||||||
|
|
||||||
GENERIC: fill-irc-message-slots ( irc-message -- )
|
GENERIC: fill-irc-message-slots ( irc-message -- )
|
||||||
M: irc-message fill-irc-message-slots
|
M: irc-message fill-irc-message-slots
|
||||||
|
gmt >>timestamp
|
||||||
{
|
{
|
||||||
[ process-irc-trailing ]
|
[ process-irc-trailing ]
|
||||||
[ process-irc-prefix ]
|
[ process-irc-prefix ]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
! 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 fry splitting ascii calendar accessors combinators
|
USING: kernel fry splitting ascii accessors combinators
|
||||||
arrays classes.tuple math.order words assocs
|
arrays classes.tuple math.order words assocs
|
||||||
irc.messages.base sequences ;
|
irc.messages.base sequences ;
|
||||||
IN: irc.messages.parser
|
IN: irc.messages.parser
|
||||||
|
|
@ -32,4 +32,4 @@ PRIVATE>
|
||||||
[ >>trailing ]
|
[ >>trailing ]
|
||||||
tri*
|
tri*
|
||||||
[ (>>prefix) ] [ fill-irc-message-slots ] [ swap >>line ] tri
|
[ (>>prefix) ] [ fill-irc-message-slots ] [ swap >>line ] tri
|
||||||
gmt >>timestamp dup sender >>sender ;
|
dup sender >>sender ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue