packages feed

lambdabot-xmpp 0.1.0.4 → 0.1.0.5

raw patch · 2 files changed

+22/−26 lines, 2 filesdep ~basedep ~lambdabot-coredep ~lambdabot-haskell-plugins

Dependency ranges changed: base, lambdabot-core, lambdabot-haskell-plugins, lambdabot-irc-plugins, lambdabot-misc-plugins, lambdabot-novelty-plugins, lambdabot-reference-plugins, lambdabot-social-plugins, network, tls

Files

XMPP.hs view
@@ -10,6 +10,7 @@ import Control.Monad import Data.List.Split import Data.List+import Data.Word  -- Hackage import Control.Concurrent@@ -17,21 +18,13 @@ import Control.Concurrent.Lifted (fork) import Control.Exception.Lifted as E (SomeException(..), throwIO, catch) import Control.Monad.Trans (lift)-import Network (PortID(..)) import qualified Data.Text as T import Network.TLS (   ClientParams(..), ClientHooks(..), defaultParamsClient, Supported(..)   ) import qualified Network.TLS.Extra as CI import Data.Default (def)-import Network.Xmpp (-  SessionConfiguration(sessionStreamConfiguration)-  , StreamConfiguration(tlsParams)-  , parseJid, getJid, resourcepart, Session, session, plain-  , Presence(presenceFrom, presenceTo, presencePayload)-  , sendPresence, getMessage, messageFrom, messageTo, messagePayload-  , sendMessage, Message(..), MessageType(..)-  )+import Network.Xmpp import Data.XML.Types (   nameLocalName, elementName, elementText   , Element(Element), Name(Name), Content(ContentText), Node(..)@@ -51,7 +44,7 @@  data XMPPConfig = XMPPConfig {     xmppHost :: String,-    xmppPort :: PortID,+    xmppPort :: Word16,     xmppUser :: String,     xmppNick :: String,     xmppPass :: String,@@ -72,7 +65,7 @@             , process = \rest ->                          case splitOn " " rest of                           tag:hostn:portn:usern:nick:passw:room -> do-                              pn <- (PortNumber . fromInteger) `fmap` readM portn+                              pn <- fromInteger `fmap` readM portn                               let xmppconf = XMPPConfig hostn pn usern nick passw (intercalate " " room)                               lift (online tag xmppconf)                           _ -> say "XMPP: Not enough parameters!"@@ -91,7 +84,7 @@         True -> T.replace "ACTION" "/me" m         False -> T.stripStart m -joinMessages = T.intercalate (T.singleton '\n')+joinMessages = T.intercalate (T.singleton '\n') . filter (not . T.null)  readTimeout :: Chan T.Text -> Int -> IO T.Text readTimeout chan time = do@@ -170,7 +163,10 @@     result <- session               (xmppHost xmppconf)               (Just (\_ -> [plain (T.pack . xmppUser $ xmppconf) Nothing (T.pack . xmppPass $ xmppconf)], Nothing))-              def+              def { onConnectionClosed = \sess _ -> do+                      reconnect' sess+                      sendMUCPresence xmppconf sess+                  }     sess <- case result of                 Right s -> return s                 Left e -> error $ "XmppFailure: " ++ (show e)
lambdabot-xmpp.cabal view
@@ -1,5 +1,5 @@ name:                lambdabot-xmpp-version:             0.1.0.4+version:             0.1.0.5 synopsis:            Lambdabot plugin for XMPP (Jabber) protocol description:         Usage: cabal build && .\/dist\/build\/lambdabot\/lambdabot -e 'xmpp-connect asdfasdf example.com 5222 username nick password haskell@conference.example.com' license:             OtherLicense@@ -9,7 +9,7 @@ category:            Development build-type:          Simple cabal-version:       >=1.10-Tested-With:         GHC == 8.6.5+Tested-With:         GHC == 8.10.1  Source-repository head   type:              git@@ -18,29 +18,29 @@ Source-repository this   type:              git   location:          https://github.com/l29ah/lambdabot-xmpp-  tag:               0.1.0.4+  tag:               0.1.0.5  executable lambdabot-xmpp   main-is:             Main.hs   other-modules:        Modules,                         Paths_lambdabot_xmpp,                         XMPP-  build-depends:        base >=4.11 && <4.13,+  build-depends:        base >= 4.11 && < 4.15,                         pontarius-xmpp >= 0.4.5 && < 0.6,-                        lambdabot-core >= 5.1 && < 5.2,-                        lambdabot-haskell-plugins >= 5.1 && < 5.2,-                        lambdabot-irc-plugins >= 5.1 && < 5.2,-                        lambdabot-misc-plugins >= 5.1 && < 5.2,-                        lambdabot-novelty-plugins >= 5.1 && < 5.2,-                        lambdabot-reference-plugins >= 5.1 && < 5.2,-                        lambdabot-social-plugins >= 5.1 && < 5.2,+                        lambdabot-core >= 5.1 && < 5.4,+                        lambdabot-haskell-plugins >= 5.1 && < 5.4,+                        lambdabot-irc-plugins >= 5.1 && < 5.4,+                        lambdabot-misc-plugins >= 5.1 && < 5.4,+                        lambdabot-novelty-plugins >= 5.1 && < 5.4,+                        lambdabot-reference-plugins >= 5.1 && < 5.4,+                        lambdabot-social-plugins >= 5.1 && < 5.4,                         data-default >= 0.7.1.1 && < 0.8,                         split >= 0.2.3.3 && < 0.3,                         lifted-base >= 0.2.3.12 && < 0.3,                         mtl >= 2.2.2 && < 2.3,-                        network >= 2.6.3.2 && < 2.9,+                        network >= 2.6.3.2 && < 3.1,                         text >= 1.2.3.1 && < 1.3,-                        tls >= 1.4.1 && < 1.5,+                        tls >= 1.4.1 && < 1.6,                         x509-validation >= 1.6.10 && < 1.7,                         xml-types >= 0.3.6 && < 0.4   default-language:    Haskell2010