irc-fun-messages 0.2.0.0 → 0.2.0.1
raw patch · 6 files changed
+57/−21 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- NEWS +26/−0
- irc-fun-messages.cabal +4/−4
- src/Network/IRC/Fun/Messages/Internal/Parse.hs +1/−1
- src/Network/IRC/Fun/Messages/Internal/Tokens/Message.hs +1/−3
- src/Network/IRC/Fun/Messages/Internal/Tokens/Other.hs +10/−0
- src/Network/IRC/Fun/Messages/Internal/Tokens/Target.hs +15/−13
NEWS view
@@ -3,6 +3,32 @@ +irc-fun-messages 0.2.0.1 -- 2015-12-17+======================================++General, build and documentation changes:++* (None)++New APIs, features and enhancements:++* (None)++Bug fixes:++* Fix bug in IPv6 parsing. It caused IPv6 users to be ignored by IRC clients+ using this library, since their messages failed to parse. In fact the parser+ *was* written according to the RFC, but now it really accepts the actually+ used IPv6 text forms.++Dependency changes:++* (None)+++++ irc-fun-messages 0.2.0.0 -- 2015-10-17 ======================================
irc-fun-messages.cabal view
@@ -1,5 +1,5 @@ name: irc-fun-messages-version: 0.2.0.0+version: 0.2.0.1 synopsis: Types and functions for working with the IRC protocol. description: Another IRC library. It doesn't provide a client API though. It just provides@@ -11,8 +11,8 @@ . NOTE: The handling of IRC protocol messages is incomplete, but there is enough to e.g. create an IRC bot. Missing features are being added as- needed while working on <http://rel4tion.org/projects/funbot FunBot>, and of- course patches are welcome.+ needed while working on <https://notabug.org/fr33domlover/funbot FunBot>, and+ of course patches are welcome. homepage: http://rel4tion.org/projects/irc-fun-messages/ bug-reports: http://rel4tion.org/projects/irc-fun-messages/tickets/ license: PublicDomain@@ -27,7 +27,7 @@ source-repository head type: darcs- location: http://dev.rel4tion.org/fr33domlover/irc-fun-messages+ location: http://hub.darcs.net/fr33domlover/irc-fun-messages library exposed-modules: Network.IRC.Fun.Messages
src/Network/IRC/Fun/Messages/Internal/Parse.hs view
@@ -333,7 +333,7 @@ -- | Read a generic reply structure into specific message or reply details. -- Return 'Left' an error description if analysis fails. ----- This is essentially a combination or 'analyzeMessage' and 'analyzeReply.+-- This is essentially a combination or 'analyzeMessage' and 'analyzeReply'. analyze :: GenericMessage -> Either String (Either SpecificReply SpecificMessage) analyze gm =
src/Network/IRC/Fun/Messages/Internal/Tokens/Message.hs view
@@ -21,9 +21,7 @@ import Data.Maybe (fromMaybe) import Network.IRC.Fun.Messages.Internal.Tokens.Other import Network.IRC.Fun.Messages.Internal.Tokens.Target-import Network.IRC.Fun.Messages.Internal.Types hiding ( prefix- , command- , params )+import Network.IRC.Fun.Messages.Internal.Types import Text.Regex.Applicative ----------TOTO
src/Network/IRC/Fun/Messages/Internal/Tokens/Other.hs view
@@ -19,6 +19,7 @@ , letter , digit , hexdigit+ , hexdigit' , special ) where@@ -43,6 +44,15 @@ hexdigit = digit <|> upperhex where upperhex = psym $ \ c -> 'A' <= c && c <= 'F'++-- RFC 2812 assumes IPv6 addresses with uppercase hex digits. In practice, the+-- recommendation it to use lowercase, and that's what really happens. So this+-- regex accepts both lowercase and uppercase.+hexdigit' :: Regex Char+hexdigit' = digit <|> upperhex <|> lowerhex+ where+ upperhex = psym $ \ c -> 'A' <= c && c <= 'F'+ lowerhex = psym $ \ c -> 'a' <= c && c <= 'f' special :: Regex Char special = psym (`elem` "[]\\`_^{|}")
src/Network/IRC/Fun/Messages/Internal/Tokens/Target.hs view
@@ -25,7 +25,7 @@ where import Data.Char (isAsciiUpper)-import Network.IRC.Fun.Messages.Internal.Types hiding (target)+import Network.IRC.Fun.Messages.Internal.Types import Network.IRC.Fun.Messages.Internal.Tokens.Other import Network.IRC.Fun.Messages.Internal.Tokens.Wildcards import Text.Regex.Applicative@@ -64,8 +64,8 @@ servername = hostname host :: Regex Host-host = HostName <$> hostname- <|> HostAddr <$> hostaddr+host = HostAddr <$> hostaddr+ <|> HostName <$> hostname <|> HostCloak <$> hostcloak hostname :: Regex String@@ -89,18 +89,20 @@ p = sym '.' ip6addr :: Regex String-ip6addr = snd <$> withMatched (a <|> b)+ip6addr = snd <$> withMatched (full <|> short <|> v4) where- h = some hexdigit+ h = some hexdigit' c = sym ':'- a = h <* c <* h <* c <*- h <* c <* h <* c <*- h <* c <* h <* c <*- h <* c <* h <* c- b = string "0:0:0:0:0:" <*- (string "0" <|> string "FFFF") <*- sym ':' <*- ip4addr+ s = h <* many (c <* h)+ full = h <* c <* h <* c <*+ h <* c <* h <* c <*+ h <* c <* h <* c <*+ h <* c <* h+ short = optional s *> string "::" <* optional s+ v4 = string "0:0:0:0:0:" <*+ (string "0" <|> string "FFFF") <*+ sym ':' <*+ ip4addr hostcloak :: Regex String hostcloak = some $ letter <|> digit <|> special <|> psym (`elem` ".-/")