clckwrks-plugin-ircbot 0.6.7 → 0.6.8
raw patch · 5 files changed
+13/−9 lines, 5 filesdep +bytestringdep ~ircbot
Dependencies added: bytestring
Dependency ranges changed: ircbot
Files
- Clckwrks/IrcBot/Page/Settings.hs +3/−2
- Clckwrks/IrcBot/Plugin.hs +5/−3
- Clckwrks/IrcBot/PreProcess.hs +1/−1
- Clckwrks/IrcBot/Types.hs +1/−1
- clckwrks-plugin-ircbot.cabal +3/−2
Clckwrks/IrcBot/Page/Settings.hs view
@@ -11,6 +11,7 @@ import Clckwrks.IrcBot.Monad (IrcBotM(..), IrcBotConfig(..), IrcBotForm, IrcFormError(..)) import Clckwrks.IrcBot.Types (IrcConfig(..)) import Clckwrks.IrcBot.URL (IrcBotURL)+import qualified Data.ByteString.Char8 as C import Data.Char (isSpace) import Data.List (intercalate) import Data.Map (Map)@@ -52,10 +53,10 @@ port = li $ label "irc port" ++> inputText (show ircPort) `transformEither` toWord16 nick = li $ label "nickname" ++> inputText (ircNick) cp = li $ label "cmd prefix" ++> inputText (ircCommandPrefix)- usrnm = li $ label "username" ++> inputText (username ircUser)+ usrnm = li $ label "username" ++> (C.pack <$> inputText (C.unpack $ username ircUser)) hstnm = li $ label "hostname" ++> inputText (hostname ircUser) srvrnm = li $ label "servername" ++> inputText (servername ircUser)- rlnm = li $ label "realname" ++> inputText (realname ircUser)+ rlnm = li $ label "realname" ++> (C.pack <$> inputText (C.unpack $ realname ircUser)) user = User <$> usrnm <*> hstnm <*> srvrnm <*> rlnm channels = li $ label "channels (comma separated)" ++> inputText (fromSet ircChannels) `transformEither` toSet enabled = li $ label "enable bot" ++> inputCheckbox ircEnabled
Clckwrks/IrcBot/Plugin.hs view
@@ -13,6 +13,8 @@ import Control.Monad.State (get) import Data.Acid as Acid import Data.Acid.Local (createCheckpointAndClose, openLocalStateFrom)+import Data.ByteString (ByteString)+import Data.ByteString.Char8 as C import Data.Text (Text) import qualified Data.Text.Lazy as TL import Data.Maybe (fromMaybe)@@ -83,10 +85,10 @@ then do let botConf = nullBotConf { channelLogger = Just $ posixLogger (Just ircBotLogDir) "#happs" , IRC.host = ircHost , IRC.port = PortNumber $ fromIntegral ircPort- , nick = ircNick+ , nick = C.pack $ ircNick , commandPrefix = ircCommandPrefix , user = ircUser- , channels = ircChannels+ , channels = Set.map C.pack ircChannels , limits = Just (5, 2000000) } ircParts <- initParts (channels botConf)@@ -96,7 +98,7 @@ else return (return ()) initParts :: (BotMonad m) =>- Set String -- ^ set of channels to join+ Set ByteString -- ^ set of channels to join -> IO [m ()] initParts chans = do (_, channelsPart) <- initChannelsPart chans
Clckwrks/IrcBot/PreProcess.hs view
@@ -18,7 +18,7 @@ parseAttr :: Text -> Parser () parseAttr name = do skipMany space- stringCI name+ asciiCI name skipMany space char '=' skipMany space
Clckwrks/IrcBot/Types.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, TemplateHaskell, TypeFamilies #-}+{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving, TemplateHaskell, TypeFamilies, OverloadedStrings #-} module Clckwrks.IrcBot.Types ( IrcConfig(..) , User(..)
clckwrks-plugin-ircbot.cabal view
@@ -1,5 +1,5 @@ Name: clckwrks-plugin-ircbot-Version: 0.6.7+Version: 0.6.8 Synopsis: ircbot plugin for clckwrks Homepage: http://clckwrks.com/ License: BSD3@@ -43,6 +43,7 @@ acid-state >= 0.12 && < 0.13, attoparsec >= 0.10 && < 0.12, blaze-html >= 0.5 && < 0.8,+ bytestring >= 0.10 && < 0.11, clckwrks >= 0.21 && < 0.23, containers >= 0.4 && < 0.6, directory >= 1.1 && < 1.3,@@ -50,7 +51,7 @@ happstack-server >= 7.0 && < 7.4, happstack-hsp >= 7.2 && < 7.4, hsp >= 0.9 && < 0.11,- ircbot >= 0.5.2 && < 0.6,+ ircbot >= 0.6 && < 0.7, ixset == 1.0.*, -- magic == 1.0.*, mtl >= 2.0 && < 2.3,