Search in sources :

Example 1 with UserStatusListener

use of org.jivesoftware.smackx.muc.UserStatusListener in project Spark by igniterealtime.

the class GroupChatRoomListener method chatRoomOpened.

@Override
public void chatRoomOpened(ChatRoom room) {
    if (!(room instanceof GroupChatRoom)) {
        return;
    }
    GroupChatRoom groupChatRoom = (GroupChatRoom) room;
    MultiUserChat chat = groupChatRoom.getMultiUserChat();
    chat.addUserStatusListener(new UserStatusListener() {

        public void kicked(String actor, String reason) {
        }

        public void voiceGranted() {
        }

        public void voiceRevoked() {
        }

        public void banned(String actor, String reason) {
        }

        public void membershipGranted() {
        }

        public void membershipRevoked() {
        }

        public void moderatorGranted() {
        }

        public void moderatorRevoked() {
        }

        public void ownershipGranted() {
        }

        public void ownershipRevoked() {
        }

        public void adminGranted() {
        }

        public void adminRevoked() {
        }
    });
}
Also used : GroupChatRoom(org.jivesoftware.spark.ui.rooms.GroupChatRoom) MultiUserChat(org.jivesoftware.smackx.muc.MultiUserChat) UserStatusListener(org.jivesoftware.smackx.muc.UserStatusListener)

Aggregations

MultiUserChat (org.jivesoftware.smackx.muc.MultiUserChat)1 UserStatusListener (org.jivesoftware.smackx.muc.UserStatusListener)1 GroupChatRoom (org.jivesoftware.spark.ui.rooms.GroupChatRoom)1