Copyright | (c) Eric Mertens 2016 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module defines the settings used for an individual IRC connection. These are static settings that are not expected change over the lifetime of a connection.
Synopsis
- data ServerSettings = ServerSettings {
- _ssNicks :: !(NonEmpty Text)
- _ssUser :: !Text
- _ssReal :: !Text
- _ssUserInfo :: !Text
- _ssPassword :: !(Maybe Text)
- _ssSaslUsername :: !(Maybe Text)
- _ssSaslPassword :: !(Maybe Text)
- _ssSaslEcdsaFile :: !(Maybe FilePath)
- _ssHostName :: !HostName
- _ssPort :: !(Maybe PortNumber)
- _ssTls :: !UseTls
- _ssTlsClientCert :: !(Maybe FilePath)
- _ssTlsClientKey :: !(Maybe FilePath)
- _ssTlsServerCert :: !(Maybe FilePath)
- _ssTlsCiphers :: String
- _ssConnectCmds :: ![[ExpansionChunk]]
- _ssSocksHost :: !(Maybe HostName)
- _ssSocksPort :: !PortNumber
- _ssChanservChannels :: ![Identifier]
- _ssFloodPenalty :: !Rational
- _ssFloodThreshold :: !Rational
- _ssMessageHooks :: ![HookConfig]
- _ssName :: !(Maybe Text)
- _ssReconnectAttempts :: !Int
- _ssAutoconnect :: !Bool
- _ssNickCompletion :: WordCompletionMode
- _ssLogDir :: Maybe FilePath
- _ssProtocolFamily :: Maybe Family
- _ssSts :: !Bool
- _ssTlsPubkeyFingerprint :: !(Maybe Fingerprint)
- _ssTlsCertFingerprint :: !(Maybe Fingerprint)
- _ssShowAccounts :: !Bool
- _ssCapabilities :: ![Text]
- data HookConfig = HookConfig Text [Text]
- serverSpec :: ValueSpec (ServerSettings -> ServerSettings)
- identifierSpec :: ValueSpec Identifier
- ssNicks :: Lens' ServerSettings (NonEmpty Text)
- ssUser :: Lens' ServerSettings Text
- ssReal :: Lens' ServerSettings Text
- ssUserInfo :: Lens' ServerSettings Text
- ssPassword :: Lens' ServerSettings (Maybe Text)
- ssSaslUsername :: Lens' ServerSettings (Maybe Text)
- ssSaslPassword :: Lens' ServerSettings (Maybe Text)
- ssSaslEcdsaFile :: Lens' ServerSettings (Maybe FilePath)
- ssHostName :: Lens' ServerSettings HostName
- ssPort :: Lens' ServerSettings (Maybe PortNumber)
- ssTls :: Lens' ServerSettings UseTls
- ssTlsClientCert :: Lens' ServerSettings (Maybe FilePath)
- ssTlsClientKey :: Lens' ServerSettings (Maybe FilePath)
- ssTlsServerCert :: Lens' ServerSettings (Maybe FilePath)
- ssTlsCiphers :: Lens' ServerSettings String
- ssConnectCmds :: Lens' ServerSettings [[ExpansionChunk]]
- ssSocksHost :: Lens' ServerSettings (Maybe HostName)
- ssSocksPort :: Lens' ServerSettings PortNumber
- ssChanservChannels :: Lens' ServerSettings [Identifier]
- ssFloodPenalty :: Lens' ServerSettings Rational
- ssFloodThreshold :: Lens' ServerSettings Rational
- ssMessageHooks :: Lens' ServerSettings [HookConfig]
- ssName :: Lens' ServerSettings (Maybe Text)
- ssReconnectAttempts :: Lens' ServerSettings Int
- ssAutoconnect :: Lens' ServerSettings Bool
- ssNickCompletion :: Lens' ServerSettings WordCompletionMode
- ssLogDir :: Lens' ServerSettings (Maybe FilePath)
- ssProtocolFamily :: Lens' ServerSettings (Maybe Family)
- ssSts :: Lens' ServerSettings Bool
- ssTlsPubkeyFingerprint :: Lens' ServerSettings (Maybe Fingerprint)
- ssTlsCertFingerprint :: Lens' ServerSettings (Maybe Fingerprint)
- ssShowAccounts :: Lens' ServerSettings Bool
- ssCapabilities :: Lens' ServerSettings [Text]
- loadDefaultServerSettings :: IO ServerSettings
- data UseTls
- data Fingerprint
Server settings type
data ServerSettings Source #
Static server-level settings
ServerSettings | |
|
Instances
Show ServerSettings Source # | |
Defined in Client.Configuration.ServerSettings showsPrec :: Int -> ServerSettings -> ShowS # show :: ServerSettings -> String # showList :: [ServerSettings] -> ShowS # |
data HookConfig Source #
Hook name and configuration arguments
Instances
Show HookConfig Source # | |
Defined in Client.Configuration.ServerSettings showsPrec :: Int -> HookConfig -> ShowS # show :: HookConfig -> String # showList :: [HookConfig] -> ShowS # |
Lenses
Load function
loadDefaultServerSettings :: IO ServerSettings Source #
Load the defaults for server settings based on the environment variables.
Environment variables USER
, IRCPASSSWORD
, and SASLPASSWORD
are used.
TLS settings
Security setting for network connection
UseTls | TLS connection |
UseInsecureTls | TLS connection without certificate checking |
UseInsecure | Plain connection |
data Fingerprint Source #
Fingerprint used to validate server certificates.
FingerprintSha1 ByteString | SHA-1 fingerprint |
FingerprintSha256 ByteString | SHA-2 256-bit fingerprint |
FingerprintSha512 ByteString | SHA-2 512-bit fingerprint |
Instances
Show Fingerprint Source # | |
Defined in Client.Configuration.ServerSettings showsPrec :: Int -> Fingerprint -> ShowS # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS # |