Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- simpleBot :: BotConf -> [BotPartT IO ()] -> IO ([ThreadId], IO ())
- simpleBot' :: Maybe (Chan Message -> IO ()) -> Logger -> Maybe (Int, Int) -> HostName -> PortNumber -> ByteString -> String -> User -> [BotPartT IO ()] -> IO ([ThreadId], IO ())
- data BotConf = BotConf {
- channelLogger :: Maybe (Chan Message -> IO ())
- logger :: Logger
- host :: HostName
- port :: PortNumber
- nick :: ByteString
- commandPrefix :: String
- user :: User
- channels :: Set ByteString
- limits :: Maybe (Int, Int)
- nullBotConf :: BotConf
- data User = User {}
- nullUser :: User
Documentation
:: BotConf | Bot configuration |
-> [BotPartT IO ()] | bot parts (must include |
-> IO ([ThreadId], IO ()) |
|
simpleBot connects to the server and handles messages using the supplied BotPartTs
the 'Chan Message' for the optional logging function will include all received and sent messages. This means that the bots output will be included in the logs.
:: Maybe (Chan Message -> IO ()) | optional logging function |
-> Logger | application logging |
-> Maybe (Int, Int) | rate limiter settings (burst length, delay in microseconds) |
-> HostName | irc server to connect |
-> PortNumber | irc port to connect to (usually, '6667') |
-> ByteString | irc nick |
-> String | command prefix |
-> User | irc user info |
-> [BotPartT IO ()] | bot parts (must include |
-> IO ([ThreadId], IO ()) |
|
simpleBot' connects to the server and handles messages using the supplied BotPartTs
the 'Chan Message' for the optional logging function will include all received and sent messages. This means that the bots output will be included in the logs.
Bot configuration
BotConf | |
|
User | |
|
Instances
Eq User Source # | |
Data User Source # | |
Defined in Network.IRC.Bot.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> User -> c User # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c User # dataTypeOf :: User -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c User) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User) # gmapT :: (forall b. Data b => b -> b) -> User -> User # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r # gmapQ :: (forall d. Data d => d -> u) -> User -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> User -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> User -> m User # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> User -> m User # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> User -> m User # | |
Ord User Source # | |
Read User Source # | |
Show User Source # | |