data/doc/xmpp4r/examples/basic/client.rb in xmpp4r-0.3.2 vs data/doc/xmpp4r/examples/basic/client.rb in xmpp4r-0.4
- old
+ new
@@ -3,10 +3,12 @@
# Basic console client that does nothing, but easy to modify to test things.
# to test, start, then type :
# connect login@server/resource password
# auth
+$:.unshift '../../../../../lib'
+
require 'xmpp4r/client'
include Jabber
Jabber::debug = true
@@ -51,18 +53,18 @@
##
# connect <jid> <password>
def do_connect(args)
@jid, @password = args.split(' ', 2)
- @jid = JID::new(@jid)
- @cl = Client::new(@jid)
+ @jid = JID.new(@jid)
+ @cl = Client.new(@jid)
@cl.connect
end
##
# auth
def do_auth
@cl.auth(@password, false)
end
end
-BasicClient::new
+BasicClient.new