X-Git-Url: https://git.martlubbers.net/?p=cloogle-irc.git;a=blobdiff_plain;f=IRC.icl;h=48a58008307f5bc304065f77b399b31f336efcf1;hp=266531a21608c453ee0503d64001641219bae149;hb=38119fcb7be8437bc535665f20af8b641ee67e64;hpb=7d7475a1a10b1371d2bc7b2276914e9d3fdfee6a diff --git a/IRC.icl b/IRC.icl index 266531a..48a5800 100644 --- a/IRC.icl +++ b/IRC.icl @@ -42,6 +42,7 @@ where , parseIRCMessage ":wilhelm.freenode.net 001 clooglebot :Welcome to the freenode Internet Relay Chat Network clooglebot\r\n" , parseIRCMessage "PING :orwell.freenode.net\r\n" , parseIRCMessage ":ChanServ!ChanServ@services. MODE #cloogle +o frobnicator\r\n" + , parseIRCMessage ":qbot_v01!~qbot@ip-213-124-170-20.ip.prioritytelecom.net PRIVMSG ##chinees :[link] Cloogle - https://cloogle.org" ] parseIRCMessage :: String -> Either [Error] IRCMessage @@ -78,7 +79,7 @@ where parseNick :: Parser Char String parseNick = pAlpha - >>= \c ->pMany (pAlpha <|> pDigit <|> pOneOf (fromString "-[]\\`^{}")) + >>= \c ->pMany (pAlpha <|> pDigit <|> pOneOf (fromString "_-[]\\`^{}")) >>= \cs->pure (toString [c:cs]) parseHost :: Parser Char String @@ -132,7 +133,7 @@ instance toString IRCUser where toString m = m.irc_nick <+ maybe "" ((<+) "!") m.irc_user <+ maybe "" ((<+) "@") m.irc_host instance toString IRCCommand where - toString m = jon " " (gIRCPrint{|*|} m) + toString m = jon " " (gIRCPrint{|*|} m) +++ "\r\n" instance toString IRCReplies where toString r = printToString r instance toString IRCErrors where toString r = printToString r