Sha256: d1f3947d823509b290234b2e6d350185a2950448f5d32609acf2276ba2c27745
Contents?: true
Size: 698 Bytes
Versions: 30
Compression:
Stored size: 698 Bytes
Contents
#!/usr/bin/ruby $:.unshift '../../../../../lib' require 'xmpp4r' require 'xmpp4r/roster/iq/roster' # Command line argument checking if ARGV.size < 4 puts("Usage: ./rosterrename.rb <your jid> <password> <jid to rename> <new name> [<group1> ... <groupn>]") exit end # Building up the connection #Jabber::debug = true jid = Jabber::JID.new(ARGV[0]) cl = Jabber::Client.new(jid) cl.connect cl.auth(ARGV[1]) # The iq stanza iq = Jabber::Iq.new(:set) # The new roster instance and item element iq.add(Jabber::Roster::IqQueryRoster.new).add(Jabber::Roster::RosterItem.new(ARGV[2], ARGV[3])).groups = ARGV[4..ARGV.size] # Sending the stanza cl.send(iq) # Don't look at the results: cl.close
Version data entries
30 entries across 30 versions & 12 rubygems