diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-08 01:23:53 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-08 01:23:53 +0100 |
commit | f8aa1bfec4df8cc7e34eae537f68ab45ed62756c (patch) | |
tree | 87ee7ef850a182c966e10f5b2a7734d09f21642e /src/main/java/eu/siacs/conversations/generator | |
parent | f8dc59be818b3a16e975bda189ad3af2f52311e6 (diff) |
kick after ban
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/generator/IqGenerator.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java index 988b9744..6dcccaab 100644 --- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java @@ -159,4 +159,14 @@ public class IqGenerator extends AbstractGenerator { item.setAttribute("affiliation", affiliation); return packet; } + + public IqPacket changeRole(Conversation conference, String nick, String role) { + IqPacket packet = new IqPacket(IqPacket.TYPE.SET); + packet.setTo(conference.getJid().toBareJid()); + packet.setFrom(conference.getAccount().getJid()); + Element item = packet.query("http://jabber.org/protocol/muc#admin").addChild("item"); + item.setAttribute("nick", nick); + item.setAttribute("role", role); + return packet; + } } |