! Copyright (C) 2009 Bruno Deferrari ! See http://factorcode.org/license.txt for BSD license. USING: kernel fry splitting ascii calendar accessors combinators arrays classes.tuple math.order words assocs irc.messages.base sequences ; IN: irc.messages.parser > [ remove-heading-: "!" split-at-first drop ] [ f ] if* ; PRIVATE> : string>irc-message ( string -- irc-message ) dup split-message [ [ irc>type new ] [ >>command ] bi ] [ >>parameters ] [ >>trailing ] tri* [ (>>prefix) ] [ fill-irc-message-slots ] [ swap >>line ] tri now >>timestamp dup sender >>sender ;