summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0405/stanza.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-11-23 21:12:08 +0100
committermathieui <mathieui@mathieui.net>2020-12-02 19:17:33 +0100
commitbdc12c00c6e4e7fc6a748133719c863d8183c81b (patch)
tree42b132326d0ff16509073387f8631e448d757650 /slixmpp/plugins/xep_0405/stanza.py
parent51cc459bd05b4c92978501410c8efb7e17ea8faf (diff)
downloadslixmpp-bdc12c00c6e4e7fc6a748133719c863d8183c81b.tar.gz
slixmpp-bdc12c00c6e4e7fc6a748133719c863d8183c81b.tar.bz2
slixmpp-bdc12c00c6e4e7fc6a748133719c863d8183c81b.tar.xz
slixmpp-bdc12c00c6e4e7fc6a748133719c863d8183c81b.zip
XEP-0405: MIX-PAM
Diffstat (limited to 'slixmpp/plugins/xep_0405/stanza.py')
-rw-r--r--slixmpp/plugins/xep_0405/stanza.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0405/stanza.py b/slixmpp/plugins/xep_0405/stanza.py
new file mode 100644
index 00000000..fe221bd6
--- /dev/null
+++ b/slixmpp/plugins/xep_0405/stanza.py
@@ -0,0 +1,43 @@
+"""
+ Slixmpp: The Slick XMPP Library
+ Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net>
+ This file is part of Slixmpp.
+
+ See the file LICENSE for copying permissio
+"""
+
+from slixmpp import JID
+from slixmpp.stanza import Iq
+from slixmpp.xmlstream import (
+ ElementBase,
+ register_stanza_plugin,
+)
+
+from slixmpp.plugins.xep_0369.stanza import (
+ Join,
+ Leave,
+)
+
+NS = 'urn:xmpp:mix:pam:2'
+
+
+class ClientJoin(ElementBase):
+ namespace = NS
+ name = 'client-join'
+ plugin_attrib = 'client_join'
+ interfaces = {'channel'}
+
+
+class ClientLeave(ElementBase):
+ namespace = NS
+ name = 'client-leave'
+ plugin_attrib = 'client_leave'
+ interfaces = {'channel'}
+
+
+def register_plugins():
+ register_stanza_plugin(Iq, ClientJoin)
+ register_stanza_plugin(ClientJoin, Join)
+
+ register_stanza_plugin(Iq, ClientLeave)
+ register_stanza_plugin(ClientLeave, Leave)