Sha256: 748df55569a77bf4bc12c41ba37dbbefa9ab75f89eeb9415c027df44a6b2033c

Contents?: true

Size: 390 Bytes

Versions: 3

Compression:

Stored size: 390 Bytes

Contents

#!/usr/bin/ruby

$:.unshift '../../../../../lib'
require 'xmpp4r'


# Argument checking
if ARGV.size != 2
  puts("Usage: #{$0} <desired jid> <password>")
  exit
end


# The usual procedure
cl = Jabber::Client.new(Jabber::JID.new(ARGV[0]))
puts "Connecting"
cl.connect

# Registration of the new user account
puts "Registering..."
cl.register(ARGV[1])
puts "Successful"

# Shutdown
cl.close

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xmpp4r-0.3.2 data/doc/xmpp4r/examples/basic/register.rb
xmpp4r-0.3 data/doc/xmpp4r/examples/basic/register.rb
xmpp4r-0.3.1 data/doc/xmpp4r/examples/basic/register.rb