 			name: name
 			args: args
 
-		console.log "about to send", sendArgs
 		client.send sendArgs
 			
 	send: (data)->

		switch name
			when 'room.join'
				@emit('roomChanged', data)
				console.log(data)
				@userId = data.user.profile.id
				console.log(@userId)
				@roomId = data.room.id
				@historyID = data.room.historyID


			reply = data.result
			if (data.status != 0)
				reply = {err: data.status}
			@rpcHandlers[data.id]?.callback?(reply)
			@parseRPCReply @rpcHandlers[data.id]?.type, reply
			delete @rpcHandlers[data.id]
