XMPP-0.1.2: XMPP library

Network.XMPP.MUC

Description

Implementation of Multi-User Chat, according to XEP-0045. This API needs more thought and will change.

Synopsis

Documentation

matchesBare :: String -> StanzaPredicateSource

Return true if the stanza is from a JID whose "username@server" part matches the given string.

joinGroupchatSource

Arguments

:: String

Nickname to use

-> String

JID of room

-> Maybe String

Room password

-> XMPP () 

Join groupchat.

leaveGroupchat :: String -> XMPP ()Source

Leave groupchat.

isGroupchatMessage :: StanzaPredicateSource

Return true if the stanza is a message of type "groupchat".

isGroupchatPrivmsg :: String -> StanzaPredicateSource

Return true if the stanza is a private message in the named room.

sendGroupchatMessageSource

Arguments

:: String

JID of chat room

-> String

Text of message

-> XMPP () 

Send a groupchat message.

sendGroupchatPrivateMessageSource

Arguments

:: String

Nick of recipient

-> String

JID of chat room

-> String

Text of message

-> XMPP () 

Send a private message in a chat room.

setGroupchatSubjectSource

Arguments

:: String

JID of chat room

-> String

Subject

-> XMPP () 

data Occupant Source

Groupchat occupant.

data Role Source

Instances

data GroupchatPresence Source

Groupchat presence. Leave, Kick and Ban are role change too of course, but it separated for simplicity sake.

Constructors

Leave 
Kick (Maybe String)

Kick reason

Ban (Maybe String)

Ban reason

NickChange String

New nick

RoleChange (Maybe String)

Role change (also show/status change) with reason.

doGroupchatPresence :: XMLElem -> (GroupchatPresence, Occupant)Source

Create groupchat presence from stanza.

isGroupchatPresence :: StanzaPredicateSource

Handler for groupchat events (joinleavekicksbansetc).

adminGroupchatSource

Arguments

:: Either Nick JID

Nickname or JID

-> String

JID of chat room

-> String

Role or affiliation argument

-> Maybe String

Reason

-> XMPP () 

Do admin actions in groupchat.