| Copyright | (c) Eric Mertens, 2016 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Client.ChannelState
Description
This module is responsible for tracking the state of an individual IRC channel while the client is connected to it. When the client joins a channel a new channel session is created and when the client leaves a channel is it destroyed.
- data ChannelState
- chanTopic :: Lens' ChannelState Text
- chanTopicProvenance :: Lens' ChannelState (Maybe TopicProvenance)
- chanUsers :: Lens' ChannelState (HashMap Identifier String)
- chanModes :: Lens' ChannelState (Map Char Text)
- chanLists :: Lens' ChannelState (Map Char (HashMap Text (Text, UTCTime)))
- chanList :: Functor f => Char -> LensLike' f ChannelState (HashMap Text (Text, UTCTime))
- chanCreation :: Lens' ChannelState (Maybe UTCTime)
- chanQueuedModeration :: Lens' ChannelState [RawIrcMsg]
- data TopicProvenance = TopicProvenance {
- _topicAuthor :: !UserInfo
- _topicTime :: !UTCTime
- topicAuthor :: Lens' TopicProvenance UserInfo
- topicTime :: Lens' TopicProvenance UTCTime
- newChannel :: ChannelState
- setTopic :: Text -> ChannelState -> ChannelState
- joinChannel :: Identifier -> ChannelState -> ChannelState
- partChannel :: Identifier -> ChannelState -> ChannelState
- nickChange :: Identifier -> Identifier -> ChannelState -> ChannelState
Channel state type
data ChannelState Source #
Instances
Lens into a mask list for a given mode.
Topic information
data TopicProvenance Source #
Constructors
| TopicProvenance | |
Fields
| |
Instances
Channel manipulation
newChannel :: ChannelState Source #
Construct an empty ChannelState
setTopic :: Text -> ChannelState -> ChannelState Source #
Set the channel topic
joinChannel :: Identifier -> ChannelState -> ChannelState Source #
Add a user to the user list
partChannel :: Identifier -> ChannelState -> ChannelState Source #
Remove a user from the user list
nickChange :: Identifier -> Identifier -> ChannelState -> ChannelState Source #
Rename a user in the user list