Created
June 2, 2014 08:15
-
-
Save soulfly/5ee6a2788021da145c9a to your computer and use it in GitHub Desktop.
Chat MUC xmpp4r: add affilations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xmpp4r/client' | |
require 'xmpp4r/muc' | |
puts "1" | |
client = Jabber::Client.new(Jabber::JID::new("[email protected]")) | |
client.connect | |
puts "2" | |
client.auth("emmaemma") | |
puts "3" | |
room = Jabber::MUC::SimpleMUCClient.new(client) | |
room.join "[email protected]/2960" | |
puts "4" | |
item = Jabber::MUC::IqQueryMUCAdminItem.new(:owner, :moderator, "[email protected]") | |
occ_jids = [] | |
occ_jids << item | |
puts occ_jids | |
room.send_affiliations(occ_jids) | |
room.exit | |
puts "5" | |
client.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment