irc-core-2.7.1: IRC core library for glirc

Copyright(c) Eric Mertens 2016
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Irc.UserInfo

Contents

Description

Information identifying users on IRC. This information includes a nickname and optionally a username and hostname.

Synopsis

Type

data UserInfo Source #

UserInfo packages a nickname along with the username and hsotname if they are known in the current context.

Constructors

UserInfo 

Fields

Instances
Eq UserInfo Source # 
Instance details

Defined in Irc.UserInfo

Read UserInfo Source # 
Instance details

Defined in Irc.UserInfo

Show UserInfo Source # 
Instance details

Defined in Irc.UserInfo

Parser and printer

renderUserInfo :: UserInfo -> Text Source #

Render UserInfo as nick!username@hostname

parseUserInfo :: Text -> UserInfo Source #

Split up a hostmask into a nickname, username, and hostname. The username and hostname might not be defined but are delimited by a ! and @ respectively.

Lenses

uiNick :: Functor f => (Identifier -> f Identifier) -> UserInfo -> f UserInfo Source #

Lens into userNick field.

uiName :: Functor f => (Text -> f Text) -> UserInfo -> f UserInfo Source #

Lens into userName field.

uiHost :: Functor f => (Text -> f Text) -> UserInfo -> f UserInfo Source #

Lens into userHost field.