pyxmpp.jabber.muc.MucRoomHandler

Package pyxmpp :: Package jabber :: Module muc :: Class MucRoomHandler |
[hide private]

# Class MucRoomHandler

source code

Base class for MUC room handlers.

Methods of this class will be called for various events in the room.

Instance Methods | [hide private]
__init__(self) Initialize a MucRoomHandler object. | source code
assign_state(self, state_obj) Assign a state object to this MucRoomHandler instance. | source code
room_created(self, stanza) Called when the room has been created. | source code
configuration_form_received(self, form) Called when a requested configuration form is received. | source code
room_configured(self) Called after a successfull room configuration. | source code
user_joined(self, user, stanza) Called when a new participant joins the room. | source code
user_left(self, user, stanza) Called when a participant leaves the room. | source code
role_changed(self, user, old_role, new_role, stanza) Called when a role of an user has been changed. | source code
affiliation_changed(self, user, old_aff, new_aff, stanza) Called when a affiliation of an user has been changed. | source code
nick_change(self, user, new_nick, stanza) Called when user nick change is started. | source code
nick_changed(self, user, old_nick, stanza) Called after a user nick has been changed. | source code
presence_changed(self, user, stanza) Called whenever user's presence changes (includes nick, role or affiliation changes). | source code
subject_changed(self, user, stanza) Called when the room subject has been changed. | source code
message_received(self, user, stanza) Called when groupchat message has been received. | source code
room_configuration_error(self, stanza) Called when an error stanza is received in reply to a room configuration request. | source code
error(self, stanza) Called when an error stanza is received. | source code

Instance Variables | [hide private]
| room_state MucRoomState object describing room state and its participants.

Method Details | [hide private]

### assign_state(self, state_obj) | source code
Assign a state object to this MucRoomHandler instance. Parameters: `state_obj` (MucRoomState) - the state object.

### room_created(self, stanza) | source code
Called when the room has been created. Default action is to request an "instant room" by accepting the default configuration. Instead the application may want to request a configuration form and submit it. Parameters: `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### configuration_form_received(self, form) | source code
Called when a requested configuration form is received. The form, after filling-in shoul be passed to `self.room_state.configure_room`. Parameters: `form` (pyxmpp.jabber.dataforms.Form) - the configuration form.

### user_joined(self, user, stanza) | source code
Called when a new participant joins the room. Parameters: `user` (MucRoomUser) - the user joining. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### user_left(self, user, stanza) | source code
Called when a participant leaves the room. Parameters: `user` (MucRoomUser) - the user leaving. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### role_changed(self, user, old_role, new_role, stanza) | source code
Called when a role of an user has been changed. Parameters: `user` (MucRoomUser) - the user (after update). `old_role` (`unicode`) - user's role before update. `new_role` (`unicode`) - user's role after update. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### affiliation_changed(self, user, old_aff, new_aff, stanza) | source code
Called when a affiliation of an user has been changed. `user` MucRoomUser object describing the user (after update). `old_aff` is user's affiliation before update. `new_aff` is user's affiliation after update. stanza the stanza received.

### nick_change(self, user, new_nick, stanza) | source code
Called when user nick change is started. Parameters: `user` (MucRoomUser) - the user (before update). `new_nick` (`unicode`) - the new nick. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### nick_changed(self, user, old_nick, stanza) | source code
Called after a user nick has been changed. Parameters: `user` (MucRoomUser) - the user (after update). `old_nick` (`unicode`) - the old nick. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### presence_changed(self, user, stanza) | source code
Called whenever user's presence changes (includes nick, role or affiliation changes). Parameters: `user` (MucRoomUser) - MucRoomUser object describing the user. `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### subject_changed(self, user, stanza) | source code
Called when the room subject has been changed. Parameters: `user` (MucRoomUser) - the user changing the subject. `stanza` (pyxmpp.stanza.Stanza) - the stanza used to change the subject.

### message_received(self, user, stanza) | source code
Called when groupchat message has been received. Parameters: `user` (MucRoomUser) - the sender. `stanza` (pyxmpp.stanza.Stanza) - is the message stanza received.

### room_configuration_error(self, stanza) | source code
Called when an error stanza is received in reply to a room configuration request. By default self.error is called. Parameters: `stanza` (pyxmpp.stanza.Stanza) - the stanza received.

### error(self, stanza) | source code
Called when an error stanza is received. Parameters: `stanza` (pyxmpp.stanza.Stanza) - the stanza received.