[Fencommits] fenfire-hs: [off] works for actions too in Irc2RDF
Tuukka Hastrup
Tuukka.Hastrup at iki.fi
Sun Apr 13 05:17:04 EEST 2008
Sun Apr 13 05:16:46 EEST 2008 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
* [off] works for actions too in Irc2RDF
M ./Fenfire/Irc2RDF.hs -5 +4
Sun Apr 13 05:16:46 EEST 2008 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
* [off] works for actions too in Irc2RDF
diff -rN -u old-fenfire-hs/Fenfire/Irc2RDF.hs new-fenfire-hs/Fenfire/Irc2RDF.hs
--- old-fenfire-hs/Fenfire/Irc2RDF.hs 2008-04-13 05:17:04.519056000 +0300
+++ new-fenfire-hs/Fenfire/Irc2RDF.hs 2008-04-13 05:17:04.529216000 +0300
@@ -169,12 +169,11 @@
triples channels root filepath (time,offset) (Just prefix) [cmd,target,msg0]
| map toUpper cmd == "PRIVMSG",
'#':channelName <- map toLower target, channelName `elem` channels,
- not $ "[off]" `isPrefixOf` msg0,
- not $ "+[off]" `isPrefixOf` msg0,
- not $ "-[off]" `isPrefixOf` msg0
+ msg <- case msg0 of '+':cs -> cs; '-':cs -> cs; cs -> cs,
+ not $ "[off]" `isPrefixOf` msg,
+ not $ "\1ACTION [off]" `isPrefixOf` msg
=
- let msg = case msg0 of '+':cs -> cs; '-':cs -> cs; cs -> cs
- file = channelName ++ "-" ++ day
+ let file = channelName ++ "-" ++ day
channel = IRI $ "irc://freenode/%23" ++ channelName
uri = root ++ file ++ "#" ++ second ++ maybe "" (('.':) . show) offset
event = IRI uri
More information about the Fencommits
mailing list