diff options
Diffstat (limited to 'poezio/multiuserchat.py')
-rw-r--r-- | poezio/multiuserchat.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/poezio/multiuserchat.py b/poezio/multiuserchat.py index 71b5cceb..d7029adf 100644 --- a/poezio/multiuserchat.py +++ b/poezio/multiuserchat.py @@ -39,41 +39,6 @@ NS_MUC_ADMIN = 'http://jabber.org/protocol/muc#admin' NS_MUC_OWNER = 'http://jabber.org/protocol/muc#owner' -def destroy_room( - xmpp: ClientXMPP, - room: str, - reason: str = '', - altroom: str = '' -) -> bool: - """ - destroy a room - """ - room = safeJID(room) - if not room: - return False - iq = xmpp.make_iq_set() - iq['to'] = room - query = ET.Element('{%s}query' % NS_MUC_OWNER) - destroy = ET.Element('{%s}destroy' % NS_MUC_OWNER) - if altroom: - destroy.attrib['jid'] = altroom - if reason: - xreason = ET.Element('{%s}reason' % NS_MUC_OWNER) - xreason.text = reason - destroy.append(xreason) - query.append(destroy) - iq.append(query) - - def callback(iq: Iq) -> None: - if not iq or iq['type'] == 'error': - xmpp.core.information('Unable to destroy room %s' % room, 'Info') - else: - xmpp.core.information('Room %s destroyed' % room, 'Info') - - iq.send(callback=callback) - return True - - def change_show( xmpp: ClientXMPP, jid: JID, |