'Process a presence stanza from a chat room. In this case,
presences from users that have just come online are
handled by sending a welcome message that includes
the user\'s nickname and role in the room.
Arguments:
presence -- The received presence stanza. See the
documentation for the Presence stanza
to see how else it may be used.'

def muc_online(self, presence):

    if (presence['muc']['nick'] != self.nick):
        self.send_message(mto=presence['from'].bare, mbody=('Hello,    %s    %s' % (presence['muc']['role'], presence['muc']['nick'])), mtype='groupchat')
