Skip to content

Commit

Permalink
SPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Mazzi committed Jul 1, 2011
1 parent 4a47798 commit 1a7a30f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/client.coffee
Expand Up @@ -5,11 +5,11 @@ response = new res


exports.Client = class Client exports.Client = class Client
constructor: (username, password, nickname) -> constructor: (username, password, nickname) ->
@username = username @username = username
@password = password @password = password
@nickname = nickname @nickname = nickname
@conference = "conference.#{username.split('@')[1]}" @conference = "conference.#{username.split('@')[1]}"
@rooms = [] @rooms = []


connect: -> connect: ->
cl = new xmpp.Client jid: @username, password: @password cl = new xmpp.Client jid: @username, password: @password
Expand All @@ -20,7 +20,7 @@ exports.Client = class Client
group = reply.stanza.attrs.type is 'groupchat' group = reply.stanza.attrs.type is 'groupchat'
if group is true if group is true
room = stanza.attrs.from.split('/')[0] room = stanza.attrs.from.split('/')[0]
msg = new xmpp.Element('message', {to: room, type: 'groupchat'}).c('body').t(res) msg = new xmpp.Element('message', {to: room, type: 'groupchat'}).c('body').t(res)
else else
msg = new xmpp.Element('message', {to: stanza.attrs.from, type: 'chat'}).c('body').t(res) msg = new xmpp.Element('message', {to: stanza.attrs.from, type: 'chat'}).c('body').t(res)
cl.send msg cl.send msg
Expand Down

0 comments on commit 1a7a30f

Please sign in to comment.