Fix hostname parsing for cloaked hostnames
[cloogle-irc.git] / IRC.icl
diff --git a/IRC.icl b/IRC.icl
index 0fb408f..8d8d9fe 100644 (file)
--- a/IRC.icl
+++ b/IRC.icl
@@ -86,7 +86,7 @@ where
                >>= \s->optional (pToken '.') >>= pure o maybe s (\p->s+++toString s)
                where
                        parseName :: Parser Char String
-                       parseName = toString <$> pSome (pAlpha <|> pDigit <|> pOneOf ['-'])
+                       parseName = toString <$> pSome (pAlpha <|> pDigit <|> pOneOf ['-', '/'])
 
 //Parse Cmd
 parseCmd :: [Char] -> Either Error IRCCommand
@@ -125,7 +125,7 @@ illegal = ['\x00','\r','\n']
 
 instance toString IRCNumReply where
        toString m = lpad (toString $ toInt m.irc_reply) 3 '0' <+ " " <+
-               m.irc_recipient <+ concat (gIRCPrint{|*|} m.irc_message)
+               m.irc_recipient <+ " " <+ concat (gIRCPrint{|*|} m.irc_message)
 instance toString IRCMessage where
        toString m = maybe "" (\s->either ((<+) ":") id s <+ " ") m.irc_prefix
                <+ either toString toString m.irc_command