lambdabot-misc-plugins 5.1.0.4 → 5.2
raw patch · 3 files changed
+6/−64 lines, 3 filesdep −hstatsddep ~lambdabot-coredep ~networkdep ~network-uri
Dependencies removed: hstatsd
Dependency ranges changed: lambdabot-core, network, network-uri
Files
- lambdabot-misc-plugins.cabal +6/−17
- src/Lambdabot/Plugin/Misc.hs +0/−2
- src/Lambdabot/Plugin/Misc/Stats.hs +0/−45
lambdabot-misc-plugins.cabal view
@@ -1,5 +1,5 @@ name: lambdabot-misc-plugins-version: 5.1.0.4+version: 5.2 license: GPL license-file: LICENSE@@ -22,24 +22,18 @@ . [hello] Hello, world. .- [stats] Ad-hoc statsd queries.- . [todo] A to-do list for lambdabot. homepage: https://wiki.haskell.org/Lambdabot build-type: Simple cabal-version: >= 1.8-tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.1+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5 source-repository head type: git location: https://github.com/lambdabot/lambdabot.git -flag network-uri- description: Get Network.URI from the network-uri package- default: True- library hs-source-dirs: src ghc-options: -Wall@@ -50,7 +44,6 @@ Lambdabot.Plugin.Misc.Error Lambdabot.Plugin.Misc.Fresh Lambdabot.Plugin.Misc.Hello- Lambdabot.Plugin.Misc.Stats Lambdabot.Plugin.Misc.Todo other-modules: Lambdabot.Plugin.Misc.Dummy.DocAssocs@@ -59,11 +52,11 @@ bytestring >= 0.9, containers >= 0.4, filepath >= 1.3,- hstatsd >= 0.1,- lambdabot-core >= 5.1 && < 5.2,+ lambdabot-core >= 5.2 && < 5.3, lifted-base >= 0.2, mtl >= 2,- time >= 1.4,+ network >= 2.7 && < 3.2,+ network-uri >= 2.6 && < 2.7, parsec >= 3, process >= 1.1, random >= 1,@@ -74,13 +67,9 @@ split >= 0.2, tagsoup >= 0.12, template-haskell >= 2.7,+ time >= 1.4, transformers >= 0.2, transformers-base >= 0.4, unix >= 2.5, utf8-string >= 0.3, zlib >= 0.5-- if flag(network-uri)- build-depends: network-uri >= 2.6, network >= 2.6- else- build-depends: network-uri < 2.6, network < 2.6
src/Lambdabot/Plugin/Misc.hs view
@@ -3,7 +3,6 @@ , errorPlugin , freshPlugin , helloPlugin- , statsPlugin , todoPlugin , miscPlugins@@ -13,7 +12,6 @@ import Lambdabot.Plugin.Misc.Error import Lambdabot.Plugin.Misc.Fresh import Lambdabot.Plugin.Misc.Hello-import Lambdabot.Plugin.Misc.Stats import Lambdabot.Plugin.Misc.Todo miscPlugins :: [String]
− src/Lambdabot/Plugin/Misc/Stats.hs
@@ -1,45 +0,0 @@-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE GADTs #-}-module Lambdabot.Plugin.Misc.Stats (statsPlugin) where--import Lambdabot.Plugin-import Lambdabot.Util--import Network.StatsD---type Stats = ModuleT StatsD LB--statsPlugin :: Module StatsD-statsPlugin = newModule- { moduleDefState = io (openStatsD host port prefix)- , contextual = \msg -> do- let n = length msg-- user <- showNick =<< getSender- chan <- showNick =<< getTarget-- counts- [ (grp ++ [stat'], val')- | grp <- [["user", user], ["channel", chan]]- , (stat', val') <- [("lines", 1), ("chars", toInteger n) ]- ]- }---- various helpers-host :: String-host = "stats.thecave.lan"--port :: String-port = "8125"--prefix :: [String]-prefix = ["lambdabot"]--report :: [Stat] -> Cmd Stats ()-report xs = do- st <- readMS- io (push st xs)--counts :: [([String], Integer)] -> Cmd Stats ()-counts xs = report [stat bucket' val' "c" Nothing | (bucket', val') <- xs]