X-Git-Url: https://git.martlubbers.net/?p=cloogle-irc.git;a=blobdiff_plain;f=IRC.icl;h=004a39b041684889bf852180f852bc6e40e0dffd;hp=d0a0098775973b0c7b7dbeb36d619de46a1136ec;hb=d8e24731b0019b32d0289977fc4620e12b0cd585;hpb=ad6f64c9f6b343f0e64eff1d3d7fa821cff203b0 diff --git a/IRC.icl b/IRC.icl index d0a0098..004a39b 100644 --- a/IRC.icl +++ b/IRC.icl @@ -3,7 +3,7 @@ implementation module IRC import StdList, StdTuple, StdOverloaded, StdFunc, StdString, StdChar, StdBool import _SystemArray -import GenPrint +import Text.GenPrint import GenIRC import Control.Applicative @@ -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