plugin XEP-0045, quick_frontend + primitivus (chat): cleaning of XEP-0045 (first pass):

- bridge methods/signals now all start with "muc" to follow new convention
    - internal method use client instead of profile to follow new convention
    - removed excetpions from plugin XEP-0045 in favor of core.exceptions, NotReady added
    - cleaned/simplified several part of the code. checkClient removed as it is not needed anymore
    - self.clients map removed, muc data are now stored directly in client
    - getRoomEntityNick and getRoomNicksOfUsers are removed as they don't look sane.
        /!\ This break all room game plugins for the moment
    - use of uuid4 instead of uuid1 for getUniqueName, as host ID and current time are used for uuid1
This commit is contained in:
Goffi 2016-06-27 21:45:11 +02:00
commit 04515e5013

View file

@ -305,7 +305,7 @@ class TextCommands(object):
if mess_data['type'] == "groupchat":
room = mess_data["to"].userhostJID()
try:
if self.host.plugins["XEP-0045"].isNickInRoom(room, entity, client.profile):
if self.host.plugins["XEP-0045"].isNickInRoom(client, room, entity):
entity = u"%s/%s" % (room, entity)
except KeyError:
log.warning("plugin XEP-0045 is not present")
@ -322,7 +322,7 @@ class TextCommands(object):
return False
if not target_jid.resource:
target_jid.resource = self.host.memory.getMainResource(target_jid, client.profile)
target_jid.resource = self.host.memory.getMainResource(client, target_jid)
whois_msg = [_(u"whois for %(jid)s") % {'jid': target_jid}]