NAME
Net::XMPP2::Ext::MUC::Room - Room class
SYNOPSIS
DESCRIPTION
This module represents a room handle for a MUC.
METHODS
- new (%args)
- get_user ($nick)
-
This method returns the user with the
$nickin the room. - get_me
-
This method returns the Net::XMPP2::Ext::MUC::User object of yourself in the room. If will return undef if we are not in the room anymore.
- get_user_jid ($jid)
-
This method looks whether a user with the JID
$jidexists in the room. That means whether the node and domain part of the JID match the rooms node and domain part, and the resource part of the JID matches a joined nick. - make_message (%args)
-
This method constructs a Net::XMPP2::Ext::MUC::Message with a connection to this room.
%argsare further arguments for the constructor of Net::XMPP2::Ext::MUC::Message. The defaulttoargument for the message is the room and thetypewill be 'groupchat'. - send_part ($msg)
-
This lets you part the room,
$msgis an optional part message and can be undef if no custom message should be generated. - users
-
Returns a list of Net::XMPP2::Ext::MUC::User objects which are in this room.
- jid
-
Returns the bare JID of this room.
- nick_jid
-
Returns the full JID of yourself in the room.
- is_connected
-
Returns true if this room is still connected (but maybe not joined (yet)).
- is_joined
-
Returns true if this room is still joined (and connected).
EVENTS
These events can be registered on with reg_cb:
- message => $msg, $is_echo
-
This event is emitted when a message was received from the room.
$msgis a Net::XMPP2::Ext::MUC::Message object and$is_echois true if the message is an echo. - error => $error
-
This event is emitted when any error occured.
$erroris a Net::XMPP2::Error::MUC object. - join_error => $error
-
This event is emitted when a error occured when joining a room.
$erroris a Net::XMPP2::Error::MUC object. - enter => $user
-
This event is emitted when we successfully joined the room.
$useris a Net::XMPP2::Ext::MUC::User object which is the user handle for ourself. - join => $user
-
This event is emitted when a new user joins the room.
$useris the Net::XMPP2::Ext::MUC::User of that user. - presence => $user
-
This event is emitted when a user changes it's presence status (eg. affiliation or role, or away status).
$useris the Net::XMPP2::Ext::MUC::User of that user. - part => $user
-
This event is emitted when a user leaves the channel.
$useris the Net::XMPP2::Ext::MUC::User of that user, but please note that you shouldn't send any messages to this user anymore. - leave
-
This event is emitted when we leave the room.
AUTHOR
Robin Redeker, <elmex at ta-sa.org>, JID: <elmex at jabber.org>
COPYRIGHT & LICENSE
Copyright 2007 Robin Redeker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.