[Fencommits] fenfire-hs: strip '+' and '-' from the beginning of IRC lines
Benja Fallenstein
benja.fallenstein at gmail.com
Tue Mar 27 22:30:04 EEST 2007
Tue Mar 27 22:29:38 EEST 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* strip '+' and '-' from the beginning of IRC lines
diff -rN -u old-fenfire-hs/Fenfire/Irc2RDF.hs new-fenfire-hs/Fenfire/Irc2RDF.hs
--- old-fenfire-hs/Fenfire/Irc2RDF.hs 2007-03-27 22:30:02.000000000 +0300
+++ new-fenfire-hs/Fenfire/Irc2RDF.hs 2007-03-27 22:30:03.000000000 +0300
@@ -142,11 +142,12 @@
triples :: [String] -> String -> FilePath -> (ClockTime, Maybe Integer) ->
Maybe String -> [String] -> (Maybe FilePath, [Triple])
-triples channels root filepath (time,offset) (Just prefix) [cmd,target,msg]
+triples channels root filepath (time,offset) (Just prefix) [cmd,target,msg0]
| map toUpper cmd == "PRIVMSG",
'#':channelName <- map toLower target, channelName `elem` channels
=
- let file = channelName ++ "-" ++ day
+ let msg = case msg0 of '+':cs -> cs; '-':cs -> cs; cs -> cs
+ 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